]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Meson: time_t size
authorFred Morcos <fred.morcos@open-xchange.com>
Mon, 3 Jul 2023 10:32:42 +0000 (12:32 +0200)
committerFred Morcos <fred.morcos@open-xchange.com>
Wed, 20 Mar 2024 12:28:24 +0000 (13:28 +0100)
meson/timet-size/meson.build [new file with mode: 0644]

diff --git a/meson/timet-size/meson.build b/meson/timet-size/meson.build
new file mode 100644 (file)
index 0000000..5e47c86
--- /dev/null
@@ -0,0 +1,9 @@
+# Check the size of time_t
+
+timet_size = cxx.sizeof('time_t', prefix: '#include <sys/types.h>')
+
+if timet_size < 8
+  error('size of time_t is ' + timet_size.to_string() + ' which is not large enough to fix the y2k38 bug')
+endif
+
+summary('Size of time_t', timet_size, section: 'System')