diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2019-05-17 11:48:46 +0200 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2019-05-23 10:15:35 +0200 |
commit | 10ec2859110c9bfda841bb21f9dda4e33b01702d (patch) | |
tree | 24d776f8e4705be2c684050ee60af58e7a16bf0c /meson.build | |
parent | 83d1e37e2ce51a56dff38466da4bdab76ae413eb (diff) |
meson.build: Test for ptrdiff_t in <stddef.h>
The build scripts assumed ptrdiff_t to just be around by default. But POSIX
specifies ptrdiff_t to be defined in <stddef.h>, which is now included from
the test.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/meson.build b/meson.build index 81303d27..2afba67b 100644 --- a/meson.build +++ b/meson.build @@ -97,6 +97,7 @@ check_headers = [['dlfcn.h','HAVE_DLFCN_H'], ['inttypes.h', 'HAVE_INTTYPES_H'], ['memory.h', 'HAVE_MEMORY_H'], ['poll.h', 'HAVE_POLL_H'], + ['stddef.h', 'HAVE_STDDEF_H'], ['stdint.h', 'HAVE_STDINT_H'], ['stdio_ext.h', 'HAVE_STDIO_EXT_H'], ['strings.h', 'HAVE_STRINGS_H'], @@ -140,8 +141,8 @@ if cc.has_function('clock_gettime', prefix : '#include <time.h>') cdata.set('HAVE_CLOCK_GETTIME', 1) endif -if cc.has_type('ptrdiff_t') - cdata.set('HAVE_PTRDIFF_T') +if cc.has_type('ptrdiff_t', prefix : '#include <stddef.h>') + cdata.set('HAVE_PTRDIFF_T', 1) endif if cc.has_function('mkstemp', prefix : '#include <stdlib.h>') |