xtables-addons: fix build error with target x64
authorGeorgi Valkov <[email protected]>
Mon, 8 Jul 2024 12:58:02 +0000 (15:58 +0300)
committerRosen Penev <[email protected]>
Tue, 9 Jul 2024 12:08:14 +0000 (05:08 -0700)
Fixes
make[6]: Entering directory '/Volumes/x64/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.36'
  CC [M]  /Volumes/x64/openwrt/build_dir/target-x86_64_musl/linux-x86_64/xtables-addons-3.24/extensions/LUA/prot_buf_ip.o
In file included from /Volumes/x64/openwrt/build_dir/target-x86_64_musl/linux-x86_64/xtables-addons-3.24/extensions/LUA/prot_buf_ip.c:20:
./include/net/checksum.h: In function 'csum_shift':
./include/net/checksum.h:90:40: error: implicit declaration of function 'ror32' [-Werror=implicit-function-declaration]
   90 |                 return (__force __wsum)ror32((__force u32)sum, 8);
      |                                        ^~~~~
In file included from ./include/linux/kernel.h:22,
                 from ./include/linux/skbuff.h:13,
                 from ./include/linux/tcp.h:17,
                 from ./include/net/tcp.h:20,
                 from /Volumes/x64/openwrt/build_dir/target-x86_64_musl/linux-x86_64/xtables-addons-3.24/extensions/LUA/prot_buf_ip.c:21:
./include/linux/bitops.h: At top level:
./include/linux/bitops.h:135:21: error: conflicting types for 'ror32'; have '__u32(__u32,  unsigned int)' {aka 'unsigned int(unsigned int,  unsigned int)'}
  135 | static inline __u32 ror32(__u32 word, unsigned int shift)
      |                     ^~~~~
./include/net/checksum.h:90:40: note: previous implicit declaration of 'ror32' with type 'int()'
   90 |                 return (__force __wsum)ror32((__force u32)sum, 8);
      |                                        ^~~~~
cc1: some warnings being treated as errors

Signed-off-by: Georgi Valkov <[email protected]>
net/xtables-addons/Makefile
net/xtables-addons/patches/200-add-lua-packetscript.patch

index cc14794802444e073896b33ae15f3fbf2e4af379..67862630eadcf46f9c1ba590e89830f0924f215e 100644 (file)
@@ -8,7 +8,7 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=xtables-addons
 PKG_VERSION:=3.24
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_HASH:=3e823f71720519ced31c4c7d2bfaf7120d9c01c59a0843dfcbe93c95c64d81c1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
index 2a97f54d75a771e3f90865c19a67ea2ba54cbc1a..bb3cc50abaddd622acab4461deecd85b5cb62d34 100644 (file)
 +
 --- /dev/null
 +++ b/extensions/LUA/prot_buf_ip.c
-@@ -0,0 +1,209 @@
+@@ -0,0 +1,210 @@
 +/*
 + *    Copyright (C) 2010 University of Basel <http://cn.cs.unibas.ch/>
 + *    by Andre Graf <[email protected]>
 + */
 +
 +#if defined(__KERNEL__)
++      #include <linux/bitops.h>
 +      #include <net/checksum.h>
 +      #include <net/tcp.h>
 +#endif
 +}
 --- /dev/null
 +++ b/extensions/LUA/prot_buf_tcp.c
-@@ -0,0 +1,188 @@
+@@ -0,0 +1,189 @@
 +/*
 + *    Copyright (C) 2010 University of Basel <http://cn.cs.unibas.ch/>
 + *    by Andre Graf <[email protected]>
 + */
 +
 +#if defined(__KERNEL__)
++      #include <linux/bitops.h>
 +      #include <net/checksum.h>
 +      #include <net/tcp.h>
 +#endif
 +}
 --- /dev/null
 +++ b/extensions/LUA/prot_buf_udp.c
-@@ -0,0 +1,53 @@
+@@ -0,0 +1,54 @@
 +/*
 + *    Copyright (C) 2010 University of Basel <http://cn.cs.unibas.ch/>
 + *    by Andre Graf <[email protected]>
 + */
 +
 +#if defined(__KERNEL__)
++      #include <linux/bitops.h>
 +      #include <net/checksum.h>
 +#endif
 +