* [PATCH] qemu: fix nativesdk build without x11
@ 2013-10-05 10:11 Eric Bénard
2013-10-07 11:34 ` Burton, Ross
0 siblings, 1 reply; 3+ messages in thread
From: Eric Bénard @ 2013-10-05 10:11 UTC (permalink / raw)
To: openembedded-core
when x11 is not defined in DISTRO_FEATURES, there are no x11 headers
so True is not defined leading to :
| ui/sdl.c:62:8: warning: type defaults to 'int' in declaration of 'doing_grabs' [-Wimplicit-int]
| static doing_grabs = True;
| ^
| ui/sdl.c:62:22: error: 'True' undeclared here (not in a function)
| static doing_grabs = True;
| ^
Signed-off-by: Eric Bénard <eric@eukrea.com>
---
meta/recipes-devtools/qemu/files/disable-grabs.patch | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/meta/recipes-devtools/qemu/files/disable-grabs.patch b/meta/recipes-devtools/qemu/files/disable-grabs.patch
index 99ad00b..41726b1 100644
--- a/meta/recipes-devtools/qemu/files/disable-grabs.patch
+++ b/meta/recipes-devtools/qemu/files/disable-grabs.patch
@@ -13,30 +13,33 @@ the current grabbing behaviour for everyone else.
Upstream-Status: Pending
Signed-off-by: Ross Burton <ross.burton@intel.com>
-
From 4b1988ecb01a178269ec0513a75f2ec620c7ef6a Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@intel.com>
Date: Wed, 18 Sep 2013 14:04:54 +0100
Subject: [PATCH] sdl.c: allow user to disable pointer grabs
Signed-off-by: Ross Burton <ross.burton@intel.com>
+Signed-off-by: Eric Bénard <eric@eukrea.com>
---
- ui/sdl.c | 9 +++++++--
- 1 file changed, 7 insertions(+), 2 deletions(-)
+ ui/sdl.c | 12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/ui/sdl.c b/ui/sdl.c
-index 39a42d6..6095aa6 100644
+index 39a42d6..9b8abe5 100644
--- a/ui/sdl.c
+++ b/ui/sdl.c
-@@ -59,6 +59,7 @@ static SDL_Cursor *guest_sprite = NULL;
+@@ -59,6 +59,10 @@ static SDL_Cursor *guest_sprite = NULL;
static SDL_PixelFormat host_format;
static int scaling_active = 0;
static Notifier mouse_mode_notifier;
++#ifndef True
++#define True 1
++#endif
+static doing_grabs = True;
static void sdl_update(DisplayChangeListener *dcl,
int x, int y, int w, int h)
-@@ -384,14 +385,16 @@ static void sdl_grab_start(void)
+@@ -384,14 +388,16 @@ static void sdl_grab_start(void)
SDL_WarpMouse(guest_x, guest_y);
} else
sdl_hide_cursor();
@@ -55,7 +58,7 @@ index 39a42d6..6095aa6 100644
gui_grab = 0;
sdl_show_cursor();
sdl_update_caption();
-@@ -909,6 +912,8 @@ void sdl_display_init(DisplayState *ds,
+@@ -909,6 +915,8 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)
* This requires SDL >= 1.2.14. */
setenv("SDL_DISABLE_LOCK_KEYS", "1", 1);
@@ -65,5 +68,5 @@ index 39a42d6..6095aa6 100644
if (SDL_Init (flags)) {
fprintf(stderr, "Could not initialize SDL(%s) - exiting\n",
--
-1.7.10.4
+1.8.3.1
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] qemu: fix nativesdk build without x11
2013-10-05 10:11 [PATCH] qemu: fix nativesdk build without x11 Eric Bénard
@ 2013-10-07 11:34 ` Burton, Ross
2013-10-07 11:51 ` Eric Bénard
0 siblings, 1 reply; 3+ messages in thread
From: Burton, Ross @ 2013-10-07 11:34 UTC (permalink / raw)
To: Eric Bénard; +Cc: OE-core
On 5 October 2013 11:11, Eric Bénard <eric@eukrea.com> wrote:
> when x11 is not defined in DISTRO_FEATURES, there are no x11 headers
> so True is not defined leading to :
> | ui/sdl.c:62:8: warning: type defaults to 'int' in declaration of 'doing_grabs' [-Wimplicit-int]
> | static doing_grabs = True;
> | ^
> | ui/sdl.c:62:22: error: 'True' undeclared here (not in a function)
> | static doing_grabs = True;
> | ^
Does qemu on SDL on framebuffer actually work? I'd assumed that
people using qemu without x11 were using it without SDL, so maybe this
is a bug in the build configuration for nativesdk.
A better fix would be to use 1/0 instead of True/False, I was assuming
that SDL meant X was being used.
Ross
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] qemu: fix nativesdk build without x11
2013-10-07 11:34 ` Burton, Ross
@ 2013-10-07 11:51 ` Eric Bénard
0 siblings, 0 replies; 3+ messages in thread
From: Eric Bénard @ 2013-10-07 11:51 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
Le Mon, 7 Oct 2013 12:34:02 +0100,
"Burton, Ross" <ross.burton@intel.com> a écrit :
> On 5 October 2013 11:11, Eric Bénard <eric@eukrea.com> wrote:
> > when x11 is not defined in DISTRO_FEATURES, there are no x11 headers
> > so True is not defined leading to :
> > | ui/sdl.c:62:8: warning: type defaults to 'int' in declaration of 'doing_grabs' [-Wimplicit-int]
> > | static doing_grabs = True;
> > | ^
> > | ui/sdl.c:62:22: error: 'True' undeclared here (not in a function)
> > | static doing_grabs = True;
> > | ^
>
> Does qemu on SDL on framebuffer actually work? I'd assumed that
> people using qemu without x11 were using it without SDL, so maybe this
> is a bug in the build configuration for nativesdk.
>
I'm not using qemu in the present case, I was simply building a sdk.
> A better fix would be to use 1/0 instead of True/False, I was assuming
> that SDL meant X was being used.
>
that would also fix the problem.
Eric
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-10-07 11:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-05 10:11 [PATCH] qemu: fix nativesdk build without x11 Eric Bénard
2013-10-07 11:34 ` Burton, Ross
2013-10-07 11:51 ` Eric Bénard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox