handle_sdl_events() makes use of the shutdown variable, but that variable is only defined later. Move the variable definitions earlier to fix the build breakage when SDL is enabled. Fixes: 231c906e52df ("sandbox: sdl: Fix unresponsive SDL GUI by handling SDL_QUIT events") Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> --- arch/sandbox/os/sdl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/sandbox/os/sdl.c b/arch/sandbox/os/sdl.c index 6f87273aced2..87c8265ea99f 100644 --- a/arch/sandbox/os/sdl.c +++ b/arch/sandbox/os/sdl.c @@ -13,6 +13,10 @@ static void sdl_perror(const char *what) printf("SDL: Could not %s: %s.\n", what, SDL_GetError()); } +static struct sdl_fb_info info; +static SDL_atomic_t shutdown; +SDL_Window *window; + static void handle_sdl_events(void) { SDL_Event event; @@ -23,10 +27,6 @@ static void handle_sdl_events(void) } } -static struct sdl_fb_info info; -static SDL_atomic_t shutdown; -SDL_Window *window; - static int scanout(void *ptr) { SDL_Renderer *renderer; -- 2.39.5