summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2020-09-08 17:50:39 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2020-09-08 23:50:12 +0100
commit107e49002d16125141f32f4ad0abe8c9ac611fbd (patch)
tree9f46efa83dbdcb0d0f6f6696d26b12a6fe630663 /meson.build
parent31a75745443a4e07aa55b743aa6ccf99cc473f2f (diff)
downloadgtk+-107e49002d16125141f32f4ad0abe8c9ac611fbd.tar.gz
Check for mlock()
We use it in the secure memory allocator, if it's available.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build5
1 files changed, 5 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 88b3e7c0d5..aa1b6e5c77 100644
--- a/meson.build
+++ b/meson.build
@@ -217,6 +217,11 @@ if cc.compiles(uint128_t_src, name : '__uint128_t available')
cdata.set('HAVE_UINT128_T', 1)
endif
+# Check for mlock
+if cc.has_function('mlock', prefix: '#include <sys/mman.h>')
+ cdata.set('HAVE_MLOCK', 1)
+endif
+
# Disable deprecation checks for all libraries we depend on on stable branches.
# This is so newer versions of those libraries don't cause more warnings with
# a stable GTK version.