Commit 88e85f4dddb7c44d5b2c8252d792ef34af3bf05a

Ryan C. Gordon 2015-04-08T01:40:01

Patched to compile on C89 compilers.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/src/video/wayland/SDL_waylandvideo.c b/src/video/wayland/SDL_waylandvideo.c
index 41f3c27..2733fd0 100644
--- a/src/video/wayland/SDL_waylandvideo.c
+++ b/src/video/wayland/SDL_waylandvideo.c
@@ -199,6 +199,7 @@ static const struct wl_output_listener output_listener = {
 static void
 Wayland_add_display(SDL_VideoData *d, uint32_t id)
 {
+    struct wl_output *output;
     SDL_VideoDisplay *display = SDL_malloc(sizeof *display);
     if (!display) {
         SDL_OutOfMemory();
@@ -206,7 +207,7 @@ Wayland_add_display(SDL_VideoData *d, uint32_t id)
     }
     SDL_zero(*display);
 
-    struct wl_output *output = wl_registry_bind(d->registry, id, &wl_output_interface, 2);
+    output = wl_registry_bind(d->registry, id, &wl_output_interface, 2);
     if (!output) {
         SDL_SetError("Failed to retrieve output.");
         return;