From 8af41935f387a787498ca213832725ff7f1bb6a2 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sat, 16 Feb 2019 22:02:58 +0000 Subject: [PATCH] build-sys: add missing ninfod checks After noticing nanosleep() check being missing I went through old ninfod/config.h.in file and verified all the things that could have been used in pre-processor conditionals. Couple more things were missing that are added in this commit. Reference: 2f565a573a34424d790224941f7cebd49edf50d0 Signed-off-by: Sami Kerola --- meson.build | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/meson.build b/meson.build index 28de3c4d..7e03f90f 100644 --- a/meson.build +++ b/meson.build @@ -20,6 +20,7 @@ conf.set('_GNU_SOURCE', 1, description : 'Enable GNU extensions on systems that # Check functions. foreach f : ''' __fpending + nanosleep '''.split() if cc.has_function(f, args : '-D_GNU_SOURCE') conf.set('HAVE_' + f.to_upper(), 1, @@ -157,6 +158,8 @@ if build_ninfod == true 'netinet/ip6.h', 'openssl/md5.h', 'pwd.h', + 'stdint.h', + 'stdlib.h', 'string.h', 'strings.h', 'sys/capability.h', @@ -172,11 +175,19 @@ if build_ninfod == true description : 'Define if ' + h + ' can be included.') endif endforeach + if cc.has_header('stdio.h') and cc.has_header('stdlib.h') and cc.has_header('stddef.h') and cc.has_header('stdarg.h') + conf.set('STDC_HEADERS', 1, + description : 'Define to 1 if you have the ANSI C header files.') + endif threads = dependency('threads') if threads.found() conf.set('ENABLE_THREADS', 1, description : 'Defined if libpthread is found.') endif + if host_machine.endian() == 'big' + conf.set('WORDS_BIGENDIAN', 1, + description : 'Defined if processor stores words with the most significant byte first.') + endif opt = get_option('NINFOD_MESSAGES') if opt == true conf.set('ENABLE_DEBUG', 1, description : 'Enable ninfod syslog messages.')