From: Jordan Williams Date: Fri, 29 Mar 2024 21:56:43 +0000 (-0500) Subject: meson: Don't define HAVE_ENVIRON_DECL when environ is unavailable X-Git-Tag: v2.42-start~461^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=640754e29475a22fb19082dbd5cd587edc05e4b7;p=thirdparty%2Futil-linux.git meson: Don't define HAVE_ENVIRON_DECL when environ is unavailable HAVE_ENVIRON_DECL is being defined to 0 by cfg_data.set10(). The code only checks whether or not is defined. This leads to it not being declared appropriately. Use cfg_data.set() instead of cfg_data.set10() to define it when true. Signed-off-by: Jordan Williams --- diff --git a/meson.build b/meson.build index 9600ce49f..e403a01f6 100644 --- a/meson.build +++ b/meson.build @@ -456,7 +456,7 @@ have_cpu_set_t = cc.sizeof('cpu_set_t', prefix : '#define _GNU_SOURCE\n#include conf.set('HAVE_CPU_SET_T', have_cpu_set_t ? 1 : false) have = cc.has_header_symbol('unistd.h', 'environ', args : '-D_GNU_SOURCE') -conf.set10('HAVE_ENVIRON_DECL', have) +conf.set('HAVE_ENVIRON_DECL', have ? 1 : false) have = cc.has_header_symbol('signal.h', 'sighandler_t', args : '-D_GNU_SOURCE') conf.set('HAVE_SIGHANDLER_T', have ? 1 : false)