aboutsummaryrefslogtreecommitdiff
path: root/backends/baum.c
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2014-03-21 21:29:37 +0000
committerPeter Maydell <peter.maydell@linaro.org>2014-03-24 17:47:29 +0000
commite279e252ac7ea99b58eaf20d0aec4288de0386bb (patch)
treed5280c206b593e1703eab63ae66ecc7c793038f0 /backends/baum.c
parent3a87f8b6859e6221b827ab4737779dddb37553ec (diff)
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>
Diffstat (limited to 'backends/baum.c')
-rw-r--r--backends/baum.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/backends/baum.c b/backends/baum.c
index 665107fa9c..759003f623 100644
--- a/backends/baum.c
+++ b/backends/baum.c
@@ -566,9 +566,11 @@ 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;
baum = g_malloc0(sizeof(BaumDriverState));
@@ -595,13 +597,15 @@ 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;
if (brlapi__enterTtyMode(handle, tty, NULL) == -1) {