summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2020-03-31 12:26:47 +0200
committerUlrich Müller <ulm@gentoo.org>2020-03-31 12:27:25 +0200
commit49476d85047c707e6f0812f0abf72cd5cb41c730 (patch)
treeddc298af1104a5c062989aaa882afef00032b557 /games-board
parentsys-apps/etckeeper: x86 stable wrt bug #715522 (diff)
downloadgentoo-49476d85047c707e6f0812f0abf72cd5cb41c730.tar.gz
gentoo-49476d85047c707e6f0812f0abf72cd5cb41c730.tar.bz2
gentoo-49476d85047c707e6f0812f0abf72cd5cb41c730.zip
games-board/polyglot: Fix compilation with musl libc.
Closes: https://bugs.gentoo.org/715560 Package-Manager: Portage-2.3.96, Repoman-2.3.22 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'games-board')
-rw-r--r--games-board/polyglot/files/polyglot-1.4.70b-musl.patch30
-rw-r--r--games-board/polyglot/polyglot-1.4.70b-r3.ebuild5
2 files changed, 34 insertions, 1 deletions
diff --git a/games-board/polyglot/files/polyglot-1.4.70b-musl.patch b/games-board/polyglot/files/polyglot-1.4.70b-musl.patch
new file mode 100644
index 00000000000..5ccbdea4a43
--- /dev/null
+++ b/games-board/polyglot/files/polyglot-1.4.70b-musl.patch
@@ -0,0 +1,30 @@
+Rename uint64_t to uint64 (same as in util.h) to avoid a name collision.
+https://bugs.gentoo.org/715560
+
+--- polyglot-1.4.70b-orig/pgheader.c
++++ polyglot-1.4.70b/pgheader.c
+@@ -49,12 +49,12 @@
+ #endif
+
+ #ifdef _MSC_VER
+- typedef unsigned __int64 uint64_t;
++ typedef unsigned __int64 uint64;
+ #else
+- typedef unsigned long long int uint64_t;
++ typedef unsigned long long int uint64;
+ #endif
+
+-static int int_from_file(FILE *f, int l, uint64_t *r){
++static int int_from_file(FILE *f, int l, uint64 *r){
+ int i,c;
+ for(i=0;i<l;i++){
+ c=fgetc(f);
+@@ -69,7 +69,7 @@
+
+ int pgheader_detect(const char *infile){
+ FILE *fin;
+- uint64_t r0,r1,r2;
++ uint64 r0,r1,r2;
+ int i;
+
+ fin=fopen(infile,"rb");
diff --git a/games-board/polyglot/polyglot-1.4.70b-r3.ebuild b/games-board/polyglot/polyglot-1.4.70b-r3.ebuild
index 23043395c45..a69460e036c 100644
--- a/games-board/polyglot/polyglot-1.4.70b-r3.ebuild
+++ b/games-board/polyglot/polyglot-1.4.70b-r3.ebuild
@@ -12,5 +12,8 @@ LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-PATCHES=( "${FILESDIR}"/${P}-no-common.patch )
+PATCHES=(
+ "${FILESDIR}"/${P}-no-common.patch
+ "${FILESDIR}"/${P}-musl.patch
+)
DOCS="AUTHORS ChangeLog TODO" # README* installed by build system