summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2018-06-11 10:53:10 +0000
committerPhilip Withnall <philip@tecnocode.co.uk>2018-06-11 10:53:10 +0000
commit262b153c411b21d93819fe10c6702ef89da24f11 (patch)
tree0f960e309a382fbf4e66498c35e81d1f51091388 /meson.build
parent379e8fd22dde53bbe5affe68b8f617ab7d7f39a6 (diff)
parenta77790330b134c66157a24395fd60bac8299f17b (diff)
downloadglib-262b153c411b21d93819fe10c6702ef89da24f11.tar.gz
Merge branch 'wip/lantw/freebsd-meson-builds' into 'master'
Fix meson build files for FreeBSD See merge request GNOME/glib!73
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build10
1 files changed, 9 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 91b8721a1..6abc2e6e2 100644
--- a/meson.build
+++ b/meson.build
@@ -207,7 +207,6 @@ headers = [
'linux/magic.h',
'locale.h',
'mach/mach_time.h',
- 'malloc.h',
'memory.h',
'mntent.h',
'poll.h',
@@ -254,6 +253,13 @@ foreach h : headers
endif
endforeach
+# FIXME: Use cc.check_header from Meson 0.47.
+# FreeBSD includes a malloc.h which always throw compilation error.
+if cc.compiles('#include <malloc.h>', name : 'malloc.h')
+ glib_conf.set('HAVE_MALLOC_H', 1)
+ glib_conf_prefix = glib_conf_prefix + '#define HAVE_MALLOC_H 1\n'
+endif
+
if cc.has_header('linux/netlink.h')
glib_conf.set('HAVE_NETLINK', 1)
endif
@@ -524,6 +530,8 @@ if cc.has_header_symbol('sys/sysmacros.h', 'major')
glib_conf.set('MAJOR_IN_SYSMACROS', 1)
elif cc.has_header_symbol('sys/mkdev.h', 'major')
glib_conf.set('MAJOR_IN_MKDEV', 1)
+elif cc.has_header_symbol('sys/types.h', 'major')
+ glib_conf.set('MAJOR_IN_TYPES', 1)
endif
if cc.has_header_symbol('dlfcn.h', 'RTLD_LAZY')