summaryrefslogtreecommitdiff
path: root/meta/recipes-qt/qt4/files
diff options
context:
space:
mode:
authorWenzong Fan <wenzong.fan@windriver.com>2012-08-02 09:43:02 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-02 15:21:02 +0100
commitbb4b71552da0d1f4396955f35db5819f88a7d2ae (patch)
tree9d5159538f150488c0f2f1c927f449b20bf246eb /meta/recipes-qt/qt4/files
parent5f1af539b3d34e6689a69d09c69d9099eee983d4 (diff)
downloadopenembedded-core-bb4b71552da0d1f4396955f35db5819f88a7d2ae.tar.gz
openembedded-core-bb4b71552da0d1f4396955f35db5819f88a7d2ae.tar.bz2
openembedded-core-bb4b71552da0d1f4396955f35db5819f88a7d2ae.zip
qt4: fix qt4-native build failure on SLED-11
This issue is that with C++ compiler process an old version of kernel header file, coincidently that file has a variable named 'new': * 'embedded/qkbdtty_qws.cpp' include 'linux/vt.h'; * '/usr/include/linux/vt.h' has below code on SLED-11.x: + unsigned int new; On mostly hosts it has been changed to: new -> newev. [YOCTO #2845] Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-qt/qt4/files')
-rw-r--r--meta/recipes-qt/qt4/files/fix_qkbdtty_qws.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/meta/recipes-qt/qt4/files/fix_qkbdtty_qws.patch b/meta/recipes-qt/qt4/files/fix_qkbdtty_qws.patch
new file mode 100644
index 0000000000..c2aed5ca0f
--- /dev/null
+++ b/meta/recipes-qt/qt4/files/fix_qkbdtty_qws.patch
@@ -0,0 +1,37 @@
+Upstream-Status: Pending
+
+This issue is that with C++ compiler process an old version of kernel
+header file, coincidently that file has a variable named 'new':
+
+* 'embedded/qkbdtty_qws.cpp' include 'linux/vt.h';
+* '/usr/include/linux/vt.h' has below code on SLED-11.x:
+ + unsigned int new;
+
+On mostly hosts it has been changed to: new -> newev.
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+=======================================
+diff --git a/src/gui/embedded/qkbdtty_qws.cpp b/src/gui/embedded/qkbdtty_qws.cpp
+--- a/src/gui/embedded/qkbdtty_qws.cpp 2012-07-27 13:16:58.420198350 +0800
++++ b/src/gui/embedded/qkbdtty_qws.cpp 2012-07-27 13:24:43.924191127 +0800
+@@ -54,8 +54,20 @@
+
+ #if defined Q_OS_LINUX
+ # include <linux/kd.h>
++
++/* Workaround kernel headers using "new" as variable name. The problem
++ is specific to SLED-11, other distros use "newev" rather than "new" */
++#ifdef __cplusplus
++#warning "workaround kernel headers using new as variable name on SLED 11"
++#define new newev
++#endif
++
+ # include <linux/vt.h> //TODO: move vt handling somewhere else (QLinuxFbScreen?)
+
++#ifdef __cplusplus
++#undef new
++#endif
++
+ # include "qscreen_qws.h"
+ # include "qwindowsystem_qws.h"
+ # include "qapplication.h"