]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Meson: tm_gmtoff in struct tm
authorFred Morcos <fred.morcos@open-xchange.com>
Sat, 17 Jun 2023 09:11:57 +0000 (11:11 +0200)
committerFred Morcos <fred.morcos@open-xchange.com>
Wed, 20 Mar 2024 12:28:24 +0000 (13:28 +0100)
meson.build

index 0eb186a2617f097a312b2e8d01d3f2b978b8ad70..6897b4d264ee4292aa638bccb968f6fb1aedcc74 100644 (file)
@@ -406,6 +406,17 @@ if cxx.has_header_symbol('ifaddrs.h', 'getifaddrs')
 endif
 summary('getifaddrs', declared, bool_yn: true, section: 'Network Functions')
 
+# Check for the tm_gmtoff field in struct tm ---------------------------------------------
+prefix = '''
+#include <sys/types.h>
+#include <time.h>
+'''
+has = cxx.has_member('struct tm', 'tm_gmtoff', prefix: prefix)
+if has
+  conf.set('HAVE_TM_GMTOFF', 1, description: 'Whether tm_gmtoff is available')
+endif
+summary('tm_gmtoff', has, bool_yn: true, section: 'System')
+
 # Generate config.h ----------------------------------------------------------------------
 config_h = configure_file(configuration: conf, output: 'config.h')
 # summary('Defines', conf.keys(), section: 'Build Configuration') # Meson 0.57