summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuya Nishihara <yuya.nishihara@qt.io>2019-07-04 15:43:23 +0900
committerJohan Helsing <johan.helsing@qt.io>2019-09-17 07:49:18 +0000
commit0c838ea604e2ac9871f78c8f11b30ce23a7c7750 (patch)
tree56a33efe0f3715f3a101533197d1b215cc42af71
parent1753b5b2f0d13549e181955faa506eac0e717201 (diff)
Fix detection of wayland-kms support
We get around the "private" symbol found in wayland-kms.h by substituting it with "priv", but doing that breaks the "private:" keyword in type_traits.h. So this patch forcibly includes math.h prior to s/private/priv/. main.cpp:3:17: error: ‘priv’ does not name a type #define private priv ^ In file included from /opt/poky-agl/5.0.3/sysroots/aarch64-agl-linux/usr/include/c++/6.3.0/cmath:43:0, from /opt/poky-agl/5.0.3/sysroots/aarch64-agl-linux/usr/include/c++/6.3.0/math.h:36, from /opt/poky-agl/5.0.3/sysroots/aarch64-agl-linux/usr/include/wayland-util.h:34, from /opt/poky-agl/5.0.3/sysroots/aarch64-agl-linux/usr/include/wayland-server-core.h:32, from /opt/poky-agl/5.0.3/sysroots/aarch64-agl-linux/usr/include/wayland-kms.h:38, from main.cpp:4: /opt/poky-agl/5.0.3/sysroots/aarch64-agl-linux/usr/include/c++/6.3.0/ext/type_traits.h:71:24: error: ‘__if_type’ has not been declared typedef typename __if_type::__type __type; ^~~~~~~~~ main.cpp:3:17: error: ‘priv’ does not name a type #define private priv ^ In file included from /opt/poky-agl/5.0.3/sysroots/aarch64-agl-linux/usr/include/c++/6.3.0/cmath:43:0, from /opt/poky-agl/5.0.3/sysroots/aarch64-agl-linux/usr/include/c++/6.3.0/math.h:36, from /opt/poky-agl/5.0.3/sysroots/aarch64-agl-linux/usr/include/wayland-util.h:34, from /opt/poky-agl/5.0.3/sysroots/aarch64-agl-linux/usr/include/wayland-server-core.h:32, from /opt/poky-agl/5.0.3/sysroots/aarch64-agl-linux/usr/include/wayland-kms.h:38, from main.cpp:4: /opt/poky-agl/5.0.3/sysroots/aarch64-agl-linux/usr/include/c++/6.3.0/ext/type_traits.h:114:24: error: ‘__if_type’ has not been declared typedef typename __if_type::__type __type; ^~~~~~~~~ Change-Id: I2b42f37d5565833adcc065725119ab4912da82b0 (cherry picked from commit 382e3292aa0eb6addac84ddefeedc98c7f3b41b2) Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
-rw-r--r--src/compositor/configure.json1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compositor/configure.json b/src/compositor/configure.json
index 985f36ddc..905ce0abb 100644
--- a/src/compositor/configure.json
+++ b/src/compositor/configure.json
@@ -28,6 +28,7 @@
"test": {
"tail": [
"extern \"C\" {",
+ "#include <math.h> /* may fail because of 'private:' in c++ type_traits.h */",
"#define private priv",
"#include <wayland-kms.h>",
"#undef private",