]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: Don't define HAVE_ENVIRON_DECL when environ is unavailable
authorJordan Williams <jordan@jwillikers.com>
Fri, 29 Mar 2024 21:56:43 +0000 (16:56 -0500)
committerJordan Williams <jordan@jwillikers.com>
Fri, 29 Mar 2024 21:59:42 +0000 (16:59 -0500)
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 <jordan@jwillikers.com>
meson.build

index 9600ce49f73d69045a9ddc304bb3570aec72a85e..e403a01f6a7f14640fc4888b496799556b046eb4 100644 (file)
@@ -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)