qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] ui/gtk: fix gtk KEY definition incompatiable


From: liguang
Subject: [Qemu-devel] [PATCH] ui/gtk: fix gtk KEY definition incompatiable
Date: Wed, 27 Feb 2013 14:35:14 +0800

fix build errors like following:

  CC    ui/gtk.o
In file included from /usr/include/gtk-2.0/gtk/gtk.h:233,
                 from ui/gtk.c:43:
ui/gtk.c: In function ‘gd_vc_init’:
ui/gtk.c:928: error: ‘GDK_KEY_2’ undeclared (first use in this function)
ui/gtk.c:928: error: (Each undeclared identifier is reported only once
ui/gtk.c:928: error: for each function it appears in.)
ui/gtk.c: In function ‘gd_create_menus’:
ui/gtk.c:1078: error: ‘GDK_KEY_f’ undeclared (first use in this function)
ui/gtk.c:1087: error: ‘GDK_KEY_plus’ undeclared (first use in this function)
ui/gtk.c:1093: error: ‘GDK_KEY_minus’ undeclared (first use in this function)
ui/gtk.c:1099: error: ‘GDK_KEY_0’ undeclared (first use in this function)
ui/gtk.c:1114: error: ‘GDK_KEY_g’ undeclared (first use in this function)
ui/gtk.c:1124: error: ‘GDK_KEY_1’ undeclared (first use in this function)

Signed-off-by: liguang <address@hidden>
---
 ui/gtk.c |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/ui/gtk.c b/ui/gtk.c
index dcce36d..69454ce 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -74,6 +74,35 @@
 
 #define MAX_VCS 10
 
+#ifndef GDK_KEY_0
+#define GDK_KEY_0 GDK_0
+#endif
+
+#ifndef GDK_KEY_1
+#define GDK_KEY_1 GDK_1
+#endif
+
+#ifndef GDK_KEY_2
+#define GDK_KEY_2 GDK_2
+#endif
+
+#ifndef GDK_KEY_f
+#define GDK_KEY_f GDK_f
+#endif
+
+#ifndef GDK_KEY_g
+#define GDK_KEY_g GDK_g
+#endif
+
+#ifndef GDK_KEY_plus
+#define GDK_KEY_plus GDK_plus
+#endif
+
+#ifndef GDK_KEY_minus
+#define GDK_KEY_minus GDK_minus
+#endif
+
+
 typedef struct VirtualConsole
 {
     GtkWidget *menu_item;
-- 
1.7.2.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]