diff options
author | Ting-Wei Lan <lantw@src.gnome.org> | 2017-12-19 17:37:58 +0800 |
---|---|---|
committer | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2017-12-22 10:30:49 -0500 |
commit | 4026211154b19abe9ce27c705a30e0278a2b224d (patch) | |
tree | 06fe8df1c2fef0a280cb211d97bd934872259315 /meson.build | |
parent | 24f01944ee0df123f3948ec756a1ca11cc64a824 (diff) |
v4l2object: Don't use mmap64 if off_t is 64-bit
The difference between mmap and mmap64 is the type of 'offset' argument.
mmap64 always uses a 64-bit interger as offset, while mmap uses off_t,
whose size can vary on different operating systems or architectures.
However, not all operating systems support mmap64. Fortunately, although
FreeBSD only has mmap, its off_t is always 64-bit regardless of
architectures, so we can simply use mmap when sizeof(off_t) == 8.
https://bugzilla.gnome.org/show_bug.cgi?id=791779
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/meson.build b/meson.build index ebae8cb576..6c1868bd9e 100644 --- a/meson.build +++ b/meson.build @@ -126,6 +126,7 @@ cdata.set('SIZEOF_INT', cc.sizeof('int')) cdata.set('SIZEOF_LONG', cc.sizeof('long')) cdata.set('SIZEOF_SHORT', cc.sizeof('short')) cdata.set('SIZEOF_VOIDP', cc.sizeof('void*')) +cdata.set('SIZEOF_OFF_T', cc.sizeof('off_t')) # Here be fixmes. # FIXME: check if this is correct |