From: Rosen Penev Date: Mon, 16 May 2022 03:24:21 +0000 (-0700) Subject: meson: fix tzname check and simplify strsignal X-Git-Tag: v2.39-rc1~662^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3b9a18e6b0a436b95639ec7db4cc170f17bbb59;p=thirdparty%2Futil-linux.git meson: fix tzname check and simplify strsignal The former needs _GNU_SOURCE under musl. The latter can just use has_function. Signed-off-by: Rosen Penev --- diff --git a/meson.build b/meson.build index c374c19a38..9d51f3775e 100644 --- a/meson.build +++ b/meson.build @@ -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 ') > 0 @@ -571,7 +571,7 @@ have = cc.has_member('struct tm', 'tm_zone', prefix : '#include ') 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 = '''