summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD5
-rw-r--r--warn_unused.patch13
3 files changed, 19 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 275ebcb8e362..e88994e510a9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -18,10 +18,11 @@ pkgbase = nethack-x11
backup = usr/games/nethack/sysconf
source = https://nethack.org/download/3.6.6/nethack-366-src.tgz
source = nethack-x11.patch
+ source = warn_unused.patch
source = nethack-x11.png::http://bugs.gentoo.org/attachment.cgi?id=86458
sha256sums = cfde0c3ab6dd7c22ae82e1e5a59ab80152304eb23fb06e3129439271e5643ed2
sha256sums = 685d68cbbd2c9854b52d71e53ca2c73c95adef43b79e7d36b6c244dc86f796e5
+ sha256sums = 6bbfb4cba6baa3b112cf5ae98593210736946f5778e8c252a925e699c02bbf2b
sha256sums = e1e0b059c617af04ee88bed4b03b73c02f022663e001c5485fe9900ca2d76295
pkgname = nethack-x11
-
diff --git a/PKGBUILD b/PKGBUILD
index 37b36063a5df..0f5e8d20c08a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -20,9 +20,11 @@ backup=('etc/nethackrc'
'usr/games/nethack/sysconf')
source=("https://nethack.org/download/${pkgver}/nethack-${pkgver//./}-src.tgz"
'nethack-x11.patch'
+ 'warn_unused.patch'
'nethack-x11.png::http://bugs.gentoo.org/attachment.cgi?id=86458')
sha256sums=('cfde0c3ab6dd7c22ae82e1e5a59ab80152304eb23fb06e3129439271e5643ed2'
'685d68cbbd2c9854b52d71e53ca2c73c95adef43b79e7d36b6c244dc86f796e5'
+ '6bbfb4cba6baa3b112cf5ae98593210736946f5778e8c252a925e699c02bbf2b'
'e1e0b059c617af04ee88bed4b03b73c02f022663e001c5485fe9900ca2d76295')
prepare() {
@@ -48,7 +50,8 @@ prepare() {
###
####
- patch -Np1 -i ../nethack-x11.patch
+ patch -Np1 -i "$srcdir/warn_unused.patch"
+ patch -Np1 -i "$srcdir/nethack-x11.patch"
# Create /etc/nethackrc with OPTIONS=windowtype:X11
setconf -a nethackrc OPTIONS 'windowtype:X11'
diff --git a/warn_unused.patch b/warn_unused.patch
new file mode 100644
index 000000000000..aa9313e09116
--- /dev/null
+++ b/warn_unused.patch
@@ -0,0 +1,13 @@
+diff --git a/include/tradstdc.h b/include/tradstdc.h
+index 12a0d4a..710a89d 100644
+--- a/include/tradstdc.h
++++ b/include/tradstdc.h
+@@ -431,7 +431,7 @@ typedef genericptr genericptr_t; /* (void *) or (char *) */
+ #define NORETURN __attribute__((noreturn))
+ /* disable gcc's __attribute__((__warn_unused_result__)) since explicitly
+ discarding the result by casting to (void) is not accepted as a 'use' */
+-#define __warn_unused_result__ /*empty*/
++#define __warn_unused_result__ __unused__
+ #define warn_unused_result /*empty*/
+ #endif
+ #endif