linuxPackages.veikk-linux-driver: fix build

with kernels >= 6.12
This commit is contained in:
eljamm
2025-05-25 00:39:48 +02:00
parent 5145e06dda
commit c5cea38e69
2 changed files with 28 additions and 0 deletions
@@ -17,6 +17,8 @@ stdenv.mkDerivation rec {
sha256 = "11mg74ds58jwvdmi3i7c4chxs6v9g09r9ll22pc2kbxjdnrp8zrn";
};
patches = [ ./fix-6.12-build.patch ];
nativeBuildInputs = kernel.moduleBuildDependencies;
buildInputs = [ kernel ];
@@ -0,0 +1,26 @@
https://github.com/torvalds/linux/commit/5f60d5f6bbc12e782fac78110b0ee62698f3b576
---
veikk_vdev.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/veikk_vdev.c b/veikk_vdev.c
index 9d0b49f..83e9efa 100644
--- a/veikk_vdev.c
+++ b/veikk_vdev.c
@@ -6,7 +6,13 @@
* - Set up the module parameters
*/
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0)
#include <asm/unaligned.h>
+#else
+#include <linux/unaligned.h>
+#endif
#include <linux/module.h>
#include "veikk.h"
--
2.49.0