packages/net/xtables-addons/patches/211-fix-build-with-kernel-6.6.patch
2024-01-26 12:58:05 +08:00

55 lines
1.2 KiB
Diff

From 03ec7e6466fc73f3278f9c4775348e9739c4abda Mon Sep 17 00:00:00 2001
From: W_Y_CPP <383152993@qq.com>
Date: Thu, 25 Jan 2024 22:38:58 -0500
Subject: [PATCH] 1
---
extensions/LUA/prot_buf_ip.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/extensions/LUA/prot_buf_ip.c b/extensions/LUA/prot_buf_ip.c
index 9c1004f..f0e28cc 100644
--- a/extensions/LUA/prot_buf_ip.c
+++ b/extensions/LUA/prot_buf_ip.c
@@ -17,7 +17,11 @@
*/
#if defined(__KERNEL__)
+#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0)
+ #include <linux/bitops.h>
+#endif
#include <net/checksum.h>
#include <net/tcp.h>
#endif
--- a/extensions/LUA/prot_buf_tcp.c
+++ b/extensions/LUA/prot_buf_tcp.c
@@ -17,6 +17,10 @@
*/
#if defined(__KERNEL__)
+#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0)
+ #include <linux/bitops.h>
+#endif
#include <net/checksum.h>
#include <net/tcp.h>
#endif
--- a/extensions/LUA/prot_buf_udp.c
+++ b/extensions/LUA/prot_buf_udp.c
@@ -17,6 +17,10 @@
*/
#if defined(__KERNEL__)
+#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0)
+ #include <linux/bitops.h>
+#endif
#include <net/checksum.h>
#endif
--
2.17.1