summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYuya Nishihara <yuya.nishihara@qt.io>2019-07-04 15:43:23 +0900
committerYuya Nishihara <yuya.nishihara@qt.io>2019-09-15 15:18:22 +0900
commit382e3292aa0eb6addac84ddefeedc98c7f3b41b2 (patch)
treed9b10f00f42bbfdfd7aa43eb128775d9b5f10076 /src
parent7f336791cea0fa7a039703e9d8a884afc69c6070 (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 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Diffstat (limited to 'src')
-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 85dc91cdb..5d8fe8dda 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",