pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/libX11 libX11: fix building with older gcc versions



details:   https://anonhg.NetBSD.org/pkgsrc/rev/31bdae5cef35
branches:  trunk
changeset: 445326:31bdae5cef35
user:      nia <nia%pkgsrc.org@localhost>
date:      Wed Jan 20 09:42:55 2021 +0000

description:
libX11: fix building with older gcc versions

diffstat:

 x11/libX11/distinfo                        |   3 +-
 x11/libX11/patches/patch-src_xkb_XKBBind.c |  49 ++++++++++++++++++++++++++++++
 2 files changed, 51 insertions(+), 1 deletions(-)

diffs (67 lines):

diff -r 8e503dcf5564 -r 31bdae5cef35 x11/libX11/distinfo
--- a/x11/libX11/distinfo       Wed Jan 20 09:10:03 2021 +0000
+++ b/x11/libX11/distinfo       Wed Jan 20 09:42:55 2021 +0000
@@ -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 @@
 SHA1 (patch-Makefile.in) = a38502ac45908a4a8d57de42e301894a2e9f8a15
 SHA1 (patch-aa) = 4f502264e7200fd2f9409d8684c53de3bc6f0649
 SHA1 (patch-ac) = 565aa2a636b5c50f67cbd11e7c2adcac8d55418e
+SHA1 (patch-src_xkb_XKBBind.c) = 3ad94bd3265c3c4a85bcf3e2da0782c16fd461d1
diff -r 8e503dcf5564 -r 31bdae5cef35 x11/libX11/patches/patch-src_xkb_XKBBind.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/libX11/patches/patch-src_xkb_XKBBind.c        Wed Jan 20 09:42:55 2021 +0000
@@ -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



Home | Main Index | Thread Index | Old Index