libX11/U_0002-Don-t-use-pragma-inside-a-function-it-breaks-compili.patch
Stefan Dirsch e17a686d68 - U_0001-Add-XFreeThreads-function.patch
U_0002-Don-t-use-pragma-inside-a-function-it-breaks-compili.patch
  U_0003-Fix-797755-Allow-X-IfEvent-to-reenter-libX11.patch
  U_0004-Indentation-fixes-around-recent-dpy-in_ifevent-chang.patch
  U_0005-ChkIfEv.c-fix-wrong-handling-of-dpy-in_ifevent.patch
  * adding all patches since 1.8.2 release in order to try fixing
    regressions after introducing thread safety constructor with
    1.8.1 (boo#1205778, boo#1205818)
- supersedes U_Fix-797755-Allow-X-IfEvent-to-reenter-libX11.patch
- re-enabled thread safe constructor

OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/libX11?expand=0&rev=91
2022-12-03 10:31:33 +00:00

61 lines
1.7 KiB
Diff

From bccd787a565d3a88673bfc06574c1939f98d8d72 Mon Sep 17 00:00:00 2001
From: Nia Alarie <nia@NetBSD.org>
Date: Thu, 10 Nov 2022 22:31:47 +0100
Subject: [PATCH 2/5] Don't use pragma inside a function, it breaks compiling
with older GCCs.
XKBBind.c:230: error: #pragma GCC diagnostic not allowed inside functions
Signed-off-by: Thomas Klausner <wiz@gatalith.at>
---
src/xkb/XKBBind.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/src/xkb/XKBBind.c b/src/xkb/XKBBind.c
index a63c86ea..467e4198 100644
--- a/src/xkb/XKBBind.c
+++ b/src/xkb/XKBBind.c
@@ -202,6 +202,14 @@ XkbKeysymToModifiers(Display *dpy, KeySym ks)
return mods;
}
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#elif defined(__GNUC__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
KeySym
XLookupKeysym(register XKeyEvent * event, int col)
{
@@ -211,22 +219,15 @@ XLookupKeysym(register XKeyEvent * event, int col)
return _XLookupKeysym(event, col);
_XkbCheckPendingRefresh(dpy, dpy->xkb_info);
-#ifdef __clang__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-#elif defined(__GNUC__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-#endif
return XKeycodeToKeysym(dpy, event->keycode, col);
+}
+
#ifdef __clang__
#pragma clang diagnostic pop
#elif defined(__GNUC__)
#pragma GCC diagnostic pop
#endif
-}
-
/*
* Not a public entry point -- XkbTranslateKey is an obsolete name
* that is preserved here so that functions linked against the old
--
2.35.3