commit:     6f862997baedb1083495e0c16c206ee42ce84f75
Author:     NHOrus <jy6x2b32pie9 <AT> yahoo <DOT> com>
AuthorDate: Thu Apr  4 11:29:45 2024 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Fri Apr  5 21:23:57 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f862997

games-arcade/xjump: Fix C99 incompatible function pointer types

This is how C does polymorphism

Fix: https://bugs.gentoo.org/882927
Signed-off-by: NHOrus <jy6x2b32pie9 <AT> yahoo.com>
Closes: https://github.com/gentoo/gentoo/pull/36094
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 games-arcade/xjump/files/xjump-2.7.5-c99.patch | 16 ++++++++++++++++
 games-arcade/xjump/xjump-2.7.5-r2.ebuild       |  3 ++-
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/games-arcade/xjump/files/xjump-2.7.5-c99.patch 
b/games-arcade/xjump/files/xjump-2.7.5-c99.patch
new file mode 100644
index 000000000000..1f2958faf686
--- /dev/null
+++ b/games-arcade/xjump/files/xjump-2.7.5-c99.patch
@@ -0,0 +1,16 @@
+Polymorphism, C way
+--- a/record.c 2024-04-04 11:22:00.801603415 +0000
++++ b/record.c 2024-04-04 11:26:16.515731335 +0000
+@@ -198,8 +198,11 @@
+ 
+ /* ��������Ӵؿ� */
+ 
+-static int sort_cmp( record_t *r1, record_t *r2 )
++static int sort_cmp(const void *v1, const void *v2 )
+ {
++ const record_t *r1 = (const record_t *) v1;
++ const record_t *r2 = (const record_t *) v2;
++
+   if( r1->score > r2->score )
+     return -1;
+   else if( r1->score < r2->score )

diff --git a/games-arcade/xjump/xjump-2.7.5-r2.ebuild 
b/games-arcade/xjump/xjump-2.7.5-r2.ebuild
index 7dacc1d1aa39..3800e1924c0f 100644
--- a/games-arcade/xjump/xjump-2.7.5-r2.ebuild
+++ b/games-arcade/xjump/xjump-2.7.5-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -32,6 +32,7 @@ PATCHES=(
        "${WORKDIR}"/debian/patches/04_makefile_respect_cflags.patch
        "${WORKDIR}"/debian/patches/05_unneded_deps.patch
        "${FILESDIR}"/${P}-ldflags.patch
+       "${FILESDIR}"/${P}-c99.patch
 )
 
 src_prepare() {

Reply via email to