From 1ec56f730231b1bc62b5ab5d253efa2a1f1c2929 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <icculus@icculus.org>
Date: Sat, 20 Oct 2018 21:35:48 -0400
Subject: [PATCH] x11: Fixed incorrect function signature for
 XkbSetDetectableAutoRepeat.

It needs to use Bool (which is an int) and not BOOL (which is CARD8), which
causes problems on platforms with different byte order and alignment, etc.

Fixes Bugzilla #4326.
---
 src/video/x11/SDL_x11keyboard.c | 2 +-
 src/video/x11/SDL_x11sym.h      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/video/x11/SDL_x11keyboard.c b/src/video/x11/SDL_x11keyboard.c
index 4e87b4c22..a57adf9bb 100644
--- a/src/video/x11/SDL_x11keyboard.c
+++ b/src/video/x11/SDL_x11keyboard.c
@@ -266,7 +266,7 @@ X11_InitKeyboard(_THIS)
     int best_distance;
     int best_index;
     int distance;
-    BOOL xkb_repeat = 0;
+    Bool xkb_repeat = 0;
     
     X11_XAutoRepeatOn(data->display);
 
diff --git a/src/video/x11/SDL_x11sym.h b/src/video/x11/SDL_x11sym.h
index a4c6d1db0..670999215 100644
--- a/src/video/x11/SDL_x11sym.h
+++ b/src/video/x11/SDL_x11sym.h
@@ -180,7 +180,7 @@ SDL_X11_SYM(Status,XkbGetUpdatedMap,(Display* a,unsigned int b,XkbDescPtr c),(a,
 SDL_X11_SYM(XkbDescPtr,XkbGetMap,(Display* a,unsigned int b,unsigned int c),(a,b,c),return)
 SDL_X11_SYM(void,XkbFreeClientMap,(XkbDescPtr a,unsigned int b, Bool c),(a,b,c),)
 SDL_X11_SYM(void,XkbFreeKeyboard,(XkbDescPtr a,unsigned int b, Bool c),(a,b,c),)
-SDL_X11_SYM(BOOL,XkbSetDetectableAutoRepeat,(Display* a, BOOL b, BOOL* c),(a,b,c),return)
+SDL_X11_SYM(Bool,XkbSetDetectableAutoRepeat,(Display* a, Bool b, Bool* c),(a,b,c),return)
 #endif
 
 #if NeedWidePrototypes