commit:     13fa47aa045933657ee7584c7ec7ba8287f07406
Author:     Emanuele Torre <torreemanuele6 <AT> gmail <DOT> com>
AuthorDate: Tue Aug 13 05:48:40 2024 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Thu Aug 15 22:24:54 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13fa47aa

games-misc/bsd-games: fix bsd-games-2.17_p28-r2 build

hunt/hunt/otto.c uses the sigpause() function that is only declared if
_GNU_SOURCE is defined in modern glibc.

Signed-off-by: Emanuele Torre <torreemanuele6 <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/38127
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 games-misc/bsd-games/bsd-games-2.17_p28-r2.ebuild          |  1 +
 .../files/bsd-games-2.17-sigpause-gnusource.patch          | 14 ++++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/games-misc/bsd-games/bsd-games-2.17_p28-r2.ebuild 
b/games-misc/bsd-games/bsd-games-2.17_p28-r2.ebuild
index 2f10eb15ba5a..9ab03508e2bd 100644
--- a/games-misc/bsd-games/bsd-games-2.17_p28-r2.ebuild
+++ b/games-misc/bsd-games/bsd-games-2.17_p28-r2.ebuild
@@ -52,6 +52,7 @@ src_prepare() {
        eapply "${FILESDIR}"/${PN}-2.17-bg.patch
        eapply "${FILESDIR}"/${PN}-2.17-gcc4.patch
        eapply "${FILESDIR}"/${PN}-2.17-rename-getdate-clash.patch
+       eapply "${FILESDIR}"/${PN}-2.17-sigpause-gnusource.patch
 
        default
 

diff --git a/games-misc/bsd-games/files/bsd-games-2.17-sigpause-gnusource.patch 
b/games-misc/bsd-games/files/bsd-games-2.17-sigpause-gnusource.patch
new file mode 100644
index 000000000000..37f98d194c6c
--- /dev/null
+++ b/games-misc/bsd-games/files/bsd-games-2.17-sigpause-gnusource.patch
@@ -0,0 +1,14 @@
+sigpause(3) is only declared if _GNU_SOURCE is defined.
+
+--- a/hunt/hunt/otto.c
++++ b/hunt/hunt/otto.c
+@@ -43,6 +43,8 @@
+  *    Id: otto.c,v 1.14 2003/04/16 06:11:54 gregc Exp
+  */
+ 
++#define _GNU_SOURCE /* for sigpause(3) */
++
+ #include <sys/cdefs.h>
+ #ifndef lint
+ __RCSID("$NetBSD: otto.c,v 1.8 2004/11/05 21:30:32 dsl Exp $");
+

Reply via email to