Received: from eggs.gnu.org ([2001:4830:134:3::10]:56207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WR70n-00076l-7Z for qemu-devel@nongnu.org; Fri, 21 Mar 2014 17:30:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WR70e-0007t5-Kz for qemu-devel@nongnu.org; Fri, 21 Mar 2014 17:29:57 -0400 From: "Richard W.M. Jones" Date: Fri, 21 Mar 2014 21:29:37 +0000 Message-Id: <1395437377-5779-1-git-send-email-rjones@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH] backends/baum.c: Fix compilation when SDL is not available. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, samuel.thibault@gnu.org backends/baum.c: In function =E2=80=98chr_baum_init=E2=80=99: 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 --- backends/baum.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/backends/baum.c b/backends/baum.c index 665107f..759003f 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; =20 baum =3D g_malloc0(sizeof(BaumDriverState)); @@ -595,13 +597,15 @@ CharDriverState *chr_baum_init(void) goto fail; } =20 -#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 =3D info.info.x11.wmwindow; else #endif +#endif tty =3D BRLAPI_TTY_DEFAULT; =20 if (brlapi__enterTtyMode(handle, tty, NULL) =3D=3D -1) { --=20 1.8.5.3