[Buildroot] [git commit] package/rtl8821cu: fix build failure with Linux 6.16
Julien Olivain
ju.o at free.fr
Sat Sep 13 11:33:07 UTC 2025
commit: https://git.buildroot.net/buildroot/commit/?id=7c5f7bf89fbe5c9ec7e3702429c80fc5e12b89a9
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
Add local patch pending upstream to fix build failure with Linux 6.16
Signed-off-by: Giulio Benetti <giulio.benetti at benettiengineering.com>
Signed-off-by: Julien Olivain <ju.o at free.fr>
---
.../rtl8821cu/0001-Fix-build-for-kernel-6.16.patch | 34 ++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/package/rtl8821cu/0001-Fix-build-for-kernel-6.16.patch b/package/rtl8821cu/0001-Fix-build-for-kernel-6.16.patch
new file mode 100644
index 0000000000..311d4fcd4c
--- /dev/null
+++ b/package/rtl8821cu/0001-Fix-build-for-kernel-6.16.patch
@@ -0,0 +1,34 @@
+From 13f85e370c265b782a801cd22f86cea6f6cda876 Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <giulio.benetti at benettiengineering.com>
+Date: Mon, 8 Sep 2025 21:04:30 +0200
+Subject: [PATCH] Fix build for kernel 6.16
+
+With commit:
+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=41cb08555c4164996d67c78b3bf1c658075b75f1
+from_timer() has been renamed to timer_container_of() so let's rename
+according to linux version >= 6.16.
+
+Upstream: https://github.com/morrownr/8821cu-20210916/pull/187
+Signed-off-by: Giulio Benetti <giulio.benetti at benettiengineering.com>
+---
+ include/osdep_service_linux.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/include/osdep_service_linux.h b/include/osdep_service_linux.h
+index ed1e19b..c25f6a2 100644
+--- a/include/osdep_service_linux.h
++++ b/include/osdep_service_linux.h
+@@ -210,6 +210,10 @@ typedef void *thread_context;
+ typedef void timer_hdl_return;
+ typedef void *timer_hdl_context;
+
++#if (LINUX_VERSION_CODE > KERNEL_VERSION(6, 16, 0))
++#define from_timer timer_container_of
++#endif
++
+ #if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 41))
+ typedef struct work_struct _workitem;
+ #else
+--
+2.43.0
+
More information about the buildroot
mailing list