Explorar el Código

backends/baum.c: Fix compilation when SDL is not available.

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>
Richard W.M. Jones hace 11 años
padre
commit
e279e252ac
Se han modificado 1 ficheros con 6 adiciones y 2 borrados
  1. 6 2
      backends/baum.c

+ 6 - 2
backends/baum.c

@@ -566,8 +566,10 @@ CharDriverState *chr_baum_init(void)
     BaumDriverState *baum;
     BaumDriverState *baum;
     CharDriverState *chr;
     CharDriverState *chr;
     brlapi_handle_t *handle;
     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;
     SDL_SysWMinfo info;
+#endif
 #endif
 #endif
     int tty;
     int tty;
 
 
@@ -595,12 +597,14 @@ CharDriverState *chr_baum_init(void)
         goto fail;
         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));
     memset(&info, 0, sizeof(info));
     SDL_VERSION(&info.version);
     SDL_VERSION(&info.version);
     if (SDL_GetWMInfo(&info))
     if (SDL_GetWMInfo(&info))
         tty = info.info.x11.wmwindow;
         tty = info.info.x11.wmwindow;
     else
     else
+#endif
 #endif
 #endif
         tty = BRLAPI_TTY_DEFAULT;
         tty = BRLAPI_TTY_DEFAULT;