SDL: x11: Ignore deprecated declaration of XKeycodeToKeysym (d38cc)

From d38ccfa88f2e1c5912546ca026dda0ae7948d2bc Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Thu, 9 Nov 2023 18:45:54 +0100
Subject: [PATCH] x11: Ignore deprecated declaration of XKeycodeToKeysym

---
 src/video/x11/SDL_x11sym.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/video/x11/SDL_x11sym.h b/src/video/x11/SDL_x11sym.h
index 2d9cbfdf2ee7..3cbd9d7461d6 100644
--- a/src/video/x11/SDL_x11sym.h
+++ b/src/video/x11/SDL_x11sym.h
@@ -185,11 +185,19 @@ 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)
 #endif
 
+/* XKeycodeToKeysym is a deprecated function */
+#if defined(__GNUC__) || defined(__clang__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
 #if NeedWidePrototypes
 SDL_X11_SYM(KeySym,XKeycodeToKeysym,(Display* a,unsigned int b,int c),(a,b,c),return)
 #else
 SDL_X11_SYM(KeySym,XKeycodeToKeysym,(Display* a,KeyCode b,int c),(a,b,c),return)
 #endif
+#if defined(__GNUC__) || defined(__clang__)
+#pragma GCC diagnostic pop
+#endif
 
 #ifdef X_HAVE_UTF8_STRING
 SDL_X11_MODULE(UTF8)