Commit 6101499c7c1254d26858724655c3d999c7c7f4d2

Sylvain 2021-12-16T09:07:31

BigEndian: fix code that generates illegal instruction with gcc-4.9.2 on powerpc Program received signal SIGILL, Illegal instruction. X11_InitKeyboard (_this=0x1001f8f0) at /home/sdl/SDL_git/src/video/x11/SDL_x11keyboard.c:273 273 XKeyboardState values = { .global_auto_repeat = AutoRepeatModeOff };

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/src/video/x11/SDL_x11keyboard.c b/src/video/x11/SDL_x11keyboard.c
index 2214ba3..5626da5 100644
--- a/src/video/x11/SDL_x11keyboard.c
+++ b/src/video/x11/SDL_x11keyboard.c
@@ -267,7 +267,9 @@ X11_InitKeyboard(_THIS)
     int best_index;
     int distance;
     Bool xkb_repeat = 0;
-    XKeyboardState values = { .global_auto_repeat = AutoRepeatModeOff };
+    XKeyboardState values;
+    SDL_zero(values);
+    values.global_auto_repeat = AutoRepeatModeOff;
     
     X11_XGetKeyboardControl(data->display, &values);
     if (values.global_auto_repeat != AutoRepeatModeOn)