]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: fix tzname check and simplify strsignal
authorRosen Penev <rosenp@gmail.com>
Mon, 16 May 2022 03:24:21 +0000 (20:24 -0700)
committerRosen Penev <rosenp@gmail.com>
Mon, 16 May 2022 03:25:08 +0000 (20:25 -0700)
The former needs _GNU_SOURCE under musl. The latter can just use
has_function.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
meson.build

index c374c19a38c5fa3eeec5a3949f925526783ce169..9d51f3775e2c81749d609c9692bfe52bd2d82184 100644 (file)
@@ -394,7 +394,7 @@ conf.set10('HAVE_ENVIRON_DECL', have)
 have = cc.has_header_symbol('signal.h', 'sighandler_t', prefix : '#define _GNU_SOURCE')
 conf.set('HAVE_SIGHANDLER_T', have ? 1 : false)
 
-have = cc.has_header_symbol('string.h', 'strsignal')
+have = cc.has_function('strsignal')
 conf.set10('HAVE_STRSIGNAL_DECL', have)
 
 have = cc.sizeof('union semun', prefix : '#include <sys/sem.h>') > 0
@@ -571,7 +571,7 @@ have = cc.has_member('struct tm', 'tm_zone',
                      prefix : '#include <time.h>')
 conf.set('HAVE_STRUCT_TM_TM_ZONE', have ? 1 : false)
 
-have = cc.has_header_symbol('time.h', 'tzname')
+have = cc.has_header_symbol('time.h', 'tzname', prefix: '#define _GNU_SOURCE')
 conf.set('HAVE_DECL_TZNAME', have ? 1 : false)
 
 code = '''