summaryrefslogtreecommitdiff
path: root/recipes/qemu/qemu-0.10.3/fix_baum_c_compilation.patch
blob: a2eb438ed955ec9b355cc5ea07efb9cc7ce1de9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Index: trunk/hw/baum.c
===================================================================
--- trunk.orig/hw/baum.c	2008-11-29 05:12:40.418390606 +0300
+++ trunk/hw/baum.c	2008-11-29 05:13:11.498378426 +0300
@@ -569,8 +569,10 @@ CharDriverState *chr_baum_init(void)
     CharDriverState *chr;
     brlapi_handle_t *handle;
 #ifdef CONFIG_SDL
+#ifdef SDL_VIDEO_DRIVER_X11
     SDL_SysWMinfo info;
 #endif
+#endif
     int tty;

     baum = qemu_mallocz(sizeof(BaumDriverState));
@@ -605,12 +607,14 @@ CharDriverState *chr_baum_init(void)
     }

 #ifdef CONFIG_SDL
+#ifdef SDL_VIDEO_DRIVER_X11
     memset(&info, 0, sizeof(info));
     SDL_VERSION(&info.version);
     if (SDL_GetWMInfo(&info))
         tty = info.info.x11.wmwindow;
     else
 #endif
+#endif
         tty = BRLAPI_TTY_DEFAULT;

     if (brlapi__enterTtyMode(handle, tty, NULL) == -1) {