backends/baum.c: Fix compilation when SDL is not available.
authorRichard W.M. Jones <rjones@redhat.com>
Fri, 21 Mar 2014 21:29:37 +0000 (21:29 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 24 Mar 2014 17:47:29 +0000 (17:47 +0000)
backends/baum.c: In function ‘chr_baum_init’:
backends/baum.c:569:64: error: missing binary operator before token "("
 #if defined(CONFIG_SDL) && SDL_COMPILEDVERSION < SDL_VERSIONNUM(2, 0, 0)
                                                                ^
backends/baum.c:598:64: error: missing binary operator before token "("
 #if defined(CONFIG_SDL) && SDL_COMPILEDVERSION < SDL_VERSIONNUM(2, 0, 0)

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Message-id: 1395437377-5779-1-git-send-email-rjones@redhat.com
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
backends/baum.c

index 665107fa9c53139a2eadcf0a8896930ac991fb9c..759003f62322b47e9647afdc9a31f30616900c61 100644 (file)
@@ -566,8 +566,10 @@ CharDriverState *chr_baum_init(void)
     BaumDriverState *baum;
     CharDriverState *chr;
     brlapi_handle_t *handle;
-#if defined(CONFIG_SDL) && SDL_COMPILEDVERSION < SDL_VERSIONNUM(2, 0, 0)
+#if defined(CONFIG_SDL)
+#if SDL_COMPILEDVERSION < SDL_VERSIONNUM(2, 0, 0)
     SDL_SysWMinfo info;
+#endif
 #endif
     int tty;
 
@@ -595,12 +597,14 @@ CharDriverState *chr_baum_init(void)
         goto fail;
     }
 
-#if defined(CONFIG_SDL) && SDL_COMPILEDVERSION < SDL_VERSIONNUM(2, 0, 0)
+#if defined(CONFIG_SDL)
+#if SDL_COMPILEDVERSION < SDL_VERSIONNUM(2, 0, 0)
     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;