diff options
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/meson.build b/meson.build index 1932410fcf7..f14af82ace7 100644 --- a/meson.build +++ b/meson.build @@ -1202,7 +1202,14 @@ if (cc.has_header_symbol('sys/mkdev.h', 'major') and pre_args += '-DMAJOR_IN_MKDEV' endif -foreach h : ['xlocale.h', 'sys/sysctl.h', 'linux/futex.h', 'endian.h', 'dlfcn.h', 'execinfo.h', 'sys/shm.h', 'cet.h'] +if not ['linux'].contains(host_machine.system()) + # Deprecated on Linux and requires <sys/types.h> on FreeBSD and OpenBSD + if cc.check_header('sys/sysctl.h', prefix : '#include <sys/types.h>') + pre_args += '-DHAVE_SYS_SYSCTL_H' + endif +endif + +foreach h : ['xlocale.h', 'linux/futex.h', 'endian.h', 'dlfcn.h', 'execinfo.h', 'sys/shm.h', 'cet.h'] if cc.check_header(h) pre_args += '-DHAVE_@0@'.format(h.to_upper().underscorify()) endif |