commit:     f663f1b0c956384345bb0891fa36d1a4cbcb06a0
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 18 16:35:55 2024 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Mon Nov 18 16:41:53 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f663f1b0

games-util/xpadneo: backport build fix for kernel 6.12

Closes: https://bugs.gentoo.org/943776
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../xpadneo/files/xpadneo-0.9.6-kernel-6.12.patch  | 24 ++++++++++++++++++++++
 games-util/xpadneo/xpadneo-0.9.6.ebuild            |  4 ++++
 2 files changed, 28 insertions(+)

diff --git a/games-util/xpadneo/files/xpadneo-0.9.6-kernel-6.12.patch 
b/games-util/xpadneo/files/xpadneo-0.9.6-kernel-6.12.patch
new file mode 100644
index 000000000000..9e5115345111
--- /dev/null
+++ b/games-util/xpadneo/files/xpadneo-0.9.6-kernel-6.12.patch
@@ -0,0 +1,24 @@
+https://bugs.gentoo.org/943776
+https://github.com/atar-axis/xpadneo/issues/498
+https://github.com/atar-axis/xpadneo/commit/4bfe0a1c35
+(+ include required linux/version.h from 242e9b46bb)
+--- a/hid-xpadneo/src/hid-xpadneo.c
++++ b/hid-xpadneo/src/hid-xpadneo.c
+@@ -713,5 +713,9 @@
+ }
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6,12,0)
+ static u8 *xpadneo_report_fixup(struct hid_device *hdev, u8 *rdesc, unsigned 
int *rsize)
++#else
++static const u8 *xpadneo_report_fixup(struct hid_device *hdev, u8 *rdesc, 
unsigned int *rsize)
++#endif
+ {
+       struct xpadneo_devdata *xdata = hid_get_drvdata(hdev);
+--- a/hid-xpadneo/src/xpadneo.h
++++ b/hid-xpadneo/src/xpadneo.h
+@@ -13,4 +13,5 @@
+ 
+ #include <linux/hid.h>
++#include <linux/version.h>
+ 
+ #include "hid-ids.h"

diff --git a/games-util/xpadneo/xpadneo-0.9.6.ebuild 
b/games-util/xpadneo/xpadneo-0.9.6.ebuild
index 54ecc4aad8c5..02e62e777f88 100644
--- a/games-util/xpadneo/xpadneo-0.9.6.ebuild
+++ b/games-util/xpadneo/xpadneo-0.9.6.ebuild
@@ -22,6 +22,10 @@ SLOT="0"
 
 CONFIG_CHECK="INPUT_FF_MEMLESS"
 
+PATCHES=(
+       "${FILESDIR}"/${P}-kernel-6.12.patch
+)
+
 src_compile() {
        local modlist=( hid-${PN}=kernel/drivers/hid:hid-${PN}:hid-${PN}/src )
        local modargs=( KERNEL_SOURCE_DIR="${KV_OUT_DIR}" )

Reply via email to