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.40.1-rc1~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=597b78f0cac7a2379208834675d1e199b1e9e32a;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 (cherry picked from commit 640754e29475a22fb19082dbd5cd587edc05e4b7) --- diff --git a/meson.build b/meson.build index bc335709d..a5328e873 100644 --- a/meson.build +++ b/meson.build @@ -452,7 +452,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)