aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build19
1 files changed, 18 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index bdcedf2eef..e8e728bf72 100644
--- a/meson.build
+++ b/meson.build
@@ -1601,6 +1601,23 @@ config_host_data.set('CONFIG_SPLICE', cc.links(gnu_source_prefix + '''
return 0;
}'''))
+config_host_data.set('HAVE_MLOCKALL', cc.links(gnu_source_prefix + '''
+ #include <sys/mman.h>
+ int main(int argc, char *argv[]) {
+ return mlockall(MCL_FUTURE);
+ }'''))
+
+# Work around a system header bug with some kernel/XFS header
+# versions where they both try to define 'struct fsxattr':
+# xfs headers will not try to redefine structs from linux headers
+# if this macro is set.
+config_host_data.set('HAVE_FSXATTR', cc.links('''
+ #include <linux/fs.h>'
+ struct fsxattr foo;
+ int main(void) {
+ return 0;
+ }'''))
+
# Some versions of Mac OS X incorrectly define SIZE_MAX
config_host_data.set('HAVE_BROKEN_SIZE_MAX', not cc.compiles('''
#include <stdint.h>
@@ -1625,7 +1642,7 @@ foreach k, v: config_host
config_host_data.set('HOST_' + v.to_upper(), 1)
elif strings.contains(k)
config_host_data.set_quoted(k, v)
- elif k.startswith('CONFIG_') or k.startswith('HAVE_')
+ elif k.startswith('CONFIG_')
config_host_data.set(k, v == 'y' ? 1 : v)
endif
endforeach