summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpiotr152 <piotr152@web.de>2024-11-21 09:57:31 +0100
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2024-11-26 02:25:36 +0000
commitb85e22dca15e1e5394fdfcb7830de15443e7071d (patch)
tree26f560eeb12aaa36cc9c580ee111b309addf3f74
parent[Backport release-24.11] ladybird: 0-unstable-2024-11-06 -> 0-unstable-2024-1... (diff)
downloadnixpkgs-origin/backport-357837-to-release-24.11.tar.gz
xpadneo: fix build issues for kernel 6.12origin/backport-357837-to-release-24.11
(cherry picked from commit 3ed0997e718588e04f974b42c0d8d5f607179380)
-rw-r--r--pkgs/os-specific/linux/xpadneo/default.nix2
-rw-r--r--pkgs/os-specific/linux/xpadneo/xpadneo-0.9.6-kernel-6.12.patch20
2 files changed, 22 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/xpadneo/default.nix b/pkgs/os-specific/linux/xpadneo/default.nix
index b186c90ddbd7..96c610b57c80 100644
--- a/pkgs/os-specific/linux/xpadneo/default.nix
+++ b/pkgs/os-specific/linux/xpadneo/default.nix
@@ -22,6 +22,8 @@ stdenv.mkDerivation (finalAttrs: {
export sourceRoot=$(pwd)/${finalAttrs.src.name}/hid-xpadneo/src
'';
+ patches = [ ./xpadneo-0.9.6-kernel-6.12.patch ];
+
nativeBuildInputs = kernel.moduleBuildDependencies;
buildInputs = [ bluez ];
diff --git a/pkgs/os-specific/linux/xpadneo/xpadneo-0.9.6-kernel-6.12.patch b/pkgs/os-specific/linux/xpadneo/xpadneo-0.9.6-kernel-6.12.patch
new file mode 100644
index 000000000000..3e0c8c605db9
--- /dev/null
+++ b/pkgs/os-specific/linux/xpadneo/xpadneo-0.9.6-kernel-6.12.patch
@@ -0,0 +1,20 @@
+--- a/hid-xpadneo.c
++++ b/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/xpadneo.h
++++ b/xpadneo.h
+@@ -13,4 +13,5 @@
+
+ #include <linux/hid.h>
++#include <linux/version.h>
+
+ #include "hid-ids.h"