nixpkgs/pkgs/os-specific/linux/ch9344/fix-linux-6-12-build.patch

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
408 B
Diff
Raw Permalink Normal View History

diff --git a/ch9344.c b/ch9344.c
index 8130334..b017faa 100644
--- a/ch9344.c
+++ b/ch9344.c
@@ -62,7 +62,11 @@
#include <linux/timer.h>
#include <linux/kfifo.h>
#include <asm/byteorder.h>
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0))
+#include <linux/unaligned.h>
+#else
#include <asm/unaligned.h>
+#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0))
#include <linux/sched/signal.h>