From 74db2b926948364d09f52b91fb69c09721ebcc77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Mat=C4=9Bjovsk=C3=BD?= Date: Thu, 13 Feb 2025 15:35:27 +0100 Subject: [PATCH] Fix: Add kernel version check for unaligned header inclusion --- driver/ch9344.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/driver/ch9344.c b/driver/ch9344.c index 8130334..f75e7cb 100644 --- a/driver/ch9344.c +++ b/driver/ch9344.c @@ -62,7 +62,12 @@ #include #include #include -#include + +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0) +#include // For kernels before 6.12 +#else +#include // For kernels 6.12 and above +#endif #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)) #include