diff options
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/meson.build b/meson.build index 12de5e80c31..d142e3e408b 100644 --- a/meson.build +++ b/meson.build @@ -2654,6 +2654,7 @@ decl_checks += [ ['preadv', 'sys/uio.h'], ['pwritev', 'sys/uio.h'], ['strchrnul', 'string.h'], + ['memset_s', 'string.h', '#define __STDC_WANT_LIB_EXT1__ 1'], ] # Check presence of some optional LLVM functions. @@ -2667,21 +2668,23 @@ endif foreach c : decl_checks func = c.get(0) header = c.get(1) - args = c.get(2, {}) + prologue = c.get(2, '') + args = c.get(3, {}) varname = 'HAVE_DECL_' + func.underscorify().to_upper() found = cc.compiles(''' -#include <@0@> +@0@ +#include <@1@> int main() { -#ifndef @1@ - (void) @1@; +#ifndef @2@ + (void) @2@; #endif return 0; } -'''.format(header, func), +'''.format(prologue, header, func), name: 'test whether @0@ is declared'.format(func), # need to add cflags_warn to get at least # -Werror=unguarded-availability-new if applicable @@ -2880,7 +2883,6 @@ func_checks = [ ['kqueue'], ['localeconv_l'], ['mbstowcs_l'], - ['memset_s'], ['mkdtemp'], ['posix_fadvise'], ['posix_fallocate'], |