[PATCH xserver 1/3] meson: Check for HAVE_TYPEOF

Adam Jackson ajax at redhat.com
Wed Sep 27 17:09:56 UTC 2017


Without this, exa's gc swap macros trigger gcc's -Wdiscarded-qualifiers.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 include/meson.build | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/meson.build b/include/meson.build
index 5cea8bbcf6..90f8de3cb9 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -11,7 +11,10 @@ dri_dep = dependency('dri', required: build_dri2 or build_dri3)
 conf_data = configuration_data()
 conf_data.set('_DIX_CONFIG_H_', '1')
 
-
+conf_data.set('HAVE_TYPEOF', cc.compiles('''
+    int foo(int bar) { typeof(bar) baz = 1; return baz; }
+''',
+    name: 'typeof()'))
 
 conf_data.set('MONOTONIC_CLOCK', cc.compiles('''
     #define _POSIX_C_SOURCE 200112L
-- 
2.13.5



More information about the xorg-devel mailing list