From 58d1986a5ed5a48593b0d139546fe47ea9263081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sat, 11 Mar 2017 22:11:07 +0000 Subject: [PATCH] meson: work around meson/gcc bug detecting linux/* headers --- meson.build | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 196e3e155e..7aee9ccda7 100644 --- a/meson.build +++ b/meson.build @@ -89,7 +89,7 @@ check_headers = [ ['HAVE_SYS_TIME_H', 'sys/time.h'], ['HAVE_SYS_TYPES_H', 'sys/types.h'], ['HAVE_UNISTD_H', 'unistd.h'], - ['HAVE_LINUX_MEMFD_H', 'linux/memfd.h'], + #['HAVE_LINUX_MEMFD_H', 'linux/memfd.h'], # FIXME: doesn't work, see below ] foreach h : check_headers @@ -98,6 +98,13 @@ foreach h : check_headers endif endforeach +# FIXME: cc.has_header('linux/memfd.h') doesn't work with meson 0.39 and gcc +# https://github.com/mesonbuild/meson/issues/1458 +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80005 +if cc.has_header_symbol('linux/memfd.h', 'MFD_CLOEXEC') + cdata.set('HAVE_LINUX_MEMFD_H', 1) +endif + check_functions = [ # check token HAVE_BIND_TEXTDOMAIN_CODESET # check token HAVE_CUPS_API_1_6