libX11: fix building with older gcc versions
This commit is contained in:
parent
3ad0787634
commit
4dd213c6b5
2 changed files with 51 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: distinfo,v 1.35 2020/11/20 20:42:53 wiz Exp $
|
||||
$NetBSD: distinfo,v 1.36 2021/01/20 09:42:55 nia Exp $
|
||||
|
||||
SHA1 (libX11-1.7.0.tar.bz2) = 48fd27a11572a7d3c1014368e1dc9f40a7b23e7d
|
||||
RMD160 (libX11-1.7.0.tar.bz2) = a3df61054babc200de47e0d5dc416461f64f8981
|
||||
|
@ -7,3 +7,4 @@ Size (libX11-1.7.0.tar.bz2) = 2409144 bytes
|
|||
SHA1 (patch-Makefile.in) = a38502ac45908a4a8d57de42e301894a2e9f8a15
|
||||
SHA1 (patch-aa) = 4f502264e7200fd2f9409d8684c53de3bc6f0649
|
||||
SHA1 (patch-ac) = 565aa2a636b5c50f67cbd11e7c2adcac8d55418e
|
||||
SHA1 (patch-src_xkb_XKBBind.c) = 3ad94bd3265c3c4a85bcf3e2da0782c16fd461d1
|
||||
|
|
49
x11/libX11/patches/patch-src_xkb_XKBBind.c
Normal file
49
x11/libX11/patches/patch-src_xkb_XKBBind.c
Normal file
|
@ -0,0 +1,49 @@
|
|||
$NetBSD: patch-src_xkb_XKBBind.c,v 1.1 2021/01/20 09:42:55 nia Exp $
|
||||
|
||||
Don't use pragma inside a function, it breaks compiling with older
|
||||
GCCs.
|
||||
|
||||
XKBBind.c:230: error: #pragma GCC diagnostic not allowed inside functions
|
||||
|
||||
--- src/xkb/XKBBind.c.orig 2020-11-20 19:08:11.000000000 +0000
|
||||
+++ src/xkb/XKBBind.c
|
||||
@@ -214,6 +214,14 @@ XkbKeysymToModifiers(Display *dpy, KeySy
|
||||
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)
|
||||
{
|
||||
@@ -223,22 +231,15 @@ XLookupKeysym(register XKeyEvent * event
|
||||
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
|
Loading…
Reference in a new issue