]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Meson: mman.h and mmap
authorFred Morcos <fred.morcos@open-xchange.com>
Mon, 3 Jul 2023 10:34:56 +0000 (12:34 +0200)
committerFred Morcos <fred.morcos@open-xchange.com>
Wed, 20 Mar 2024 12:28:26 +0000 (13:28 +0100)
meson/mmap/meson.build [new file with mode: 0644]

diff --git a/meson/mmap/meson.build b/meson/mmap/meson.build
new file mode 100644 (file)
index 0000000..f8f5adc
--- /dev/null
@@ -0,0 +1,12 @@
+# Check for mmap
+
+mman_h = cxx.has_header('sys/mman.h', required: false)
+have_mmap = false
+if mman_h
+  have_mmap = cxx.has_function('mmap', prefix: '''#include <sys/mman.h>''')
+endif
+
+conf.set10('HAVE_MMAP', have_mmap, description: 'Whether we have mmap')
+
+summary('sys/mman.h', mman_h, bool_yn: true, section: 'System')
+summary('mmap', have_mmap, bool_yn: true, section: 'System')