Skip to content

Commit

Permalink
backends/baum.c: Fix compilation when SDL is not available.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Message-id: [email protected]
Reviewed-by: Stefan Weil <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
  • Loading branch information
rwmjones authored and pm215 committed Mar 24, 2014
1 parent 3a87f8b commit e279e25
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions backends/baum.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit e279e25

Please sign in to comment.