summaryrefslogtreecommitdiffstats
path: root/meta/recipes-qt/qt4/qt4-4.8.6/0002-qkbdtty_qws-fix-build-with-old-kernel-headers.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-qt/qt4/qt4-4.8.6/0002-qkbdtty_qws-fix-build-with-old-kernel-headers.patch')
-rw-r--r--meta/recipes-qt/qt4/qt4-4.8.6/0002-qkbdtty_qws-fix-build-with-old-kernel-headers.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/meta/recipes-qt/qt4/qt4-4.8.6/0002-qkbdtty_qws-fix-build-with-old-kernel-headers.patch b/meta/recipes-qt/qt4/qt4-4.8.6/0002-qkbdtty_qws-fix-build-with-old-kernel-headers.patch
new file mode 100644
index 0000000000..98fc88738f
--- /dev/null
+++ b/meta/recipes-qt/qt4/qt4-4.8.6/0002-qkbdtty_qws-fix-build-with-old-kernel-headers.patch
@@ -0,0 +1,50 @@
1From 5e6b1051afa3099a02a758b0596236759d70670e Mon Sep 17 00:00:00 2001
2From: Wenzong Fan <wenzong.fan@windriver.com>
3Date: Wed, 26 Sep 2012 20:18:08 +0200
4Subject: [PATCH 02/21] qkbdtty_qws: fix build with old kernel headers
5
6This issue is that with C++ compiler process an old version of kernel
7header file, coincidently that file has a variable named 'new':
8
9* 'embedded/qkbdtty_qws.cpp' include 'linux/vt.h';
10* '/usr/include/linux/vt.h' has below code on SLED-11.x:
11 + unsigned int new;
12
13On mostly hosts it has been changed to: new -> newev.
14
15Upstream-Status: Pending
16
17Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
18Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
19---
20 src/gui/embedded/qkbdtty_qws.cpp | 12 ++++++++++++
21 1 file changed, 12 insertions(+)
22
23diff --git a/src/gui/embedded/qkbdtty_qws.cpp b/src/gui/embedded/qkbdtty_qws.cpp
24index a46811b..762138f 100644
25--- a/src/gui/embedded/qkbdtty_qws.cpp
26+++ b/src/gui/embedded/qkbdtty_qws.cpp
27@@ -54,8 +54,20 @@
28
29 #if defined Q_OS_LINUX
30 # include <linux/kd.h>
31+
32+/* Workaround kernel headers using "new" as variable name. The problem
33+ is specific to SLED-11, other distros use "newev" rather than "new" */
34+#ifdef __cplusplus
35+#warning "workaround kernel headers using new as variable name on SLED 11"
36+#define new newev
37+#endif
38+
39 # include <linux/vt.h> //TODO: move vt handling somewhere else (QLinuxFbScreen?)
40
41+#ifdef __cplusplus
42+#undef new
43+#endif
44+
45 # include "qscreen_qws.h"
46 # include "qwindowsystem_qws.h"
47 # include "qapplication.h"
48--
491.8.0
50