Skip to content

Commit 670f927

Browse files
committed
Fix module build for Linux v6.12
adapt to "move asm/unaligned.h to linux/unaligned.h" (5f60d5f6bbc12e782fac78110b0ee62698f3b576) in v6.12-rc2 Fixes: #237 Signed-off-by: Andreas Beckmann <anbe@debian.org>
1 parent d3e29f7 commit 670f927

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

gen_compat_def

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ kbuild_test_symbol nf_bridge_info_get linux/netfilter_bridge.h
122122
kbuild_test_struct vlan_dev_priv linux/if_vlan.h
123123
# Kernel version check broken by centos8
124124
kbuild_test_symbol put_unaligned_be24 asm/unaligned.h
125+
echo "#if !defined(HAVE_PUT_UNALIGNED_BE24)"
126+
kbuild_test_symbol put_unaligned_be24 linux/unaligned.h
127+
echo "#endif"
125128
# totalram_pages changed from atomic to inline function.
126129
kbuild_test_symbol totalram_pages linux/mm.h
127130
kbuild_test_ref totalram_pages linux/mm.h

ipt_NETFLOW.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@
6868
# include <net/netfilter/nf_conntrack_core.h>
6969
#endif
7070
#include <linux/version.h>
71+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,12,0)
72+
#include <linux/unaligned.h>
73+
#else
7174
#include <asm/unaligned.h>
75+
#endif
7276
#ifdef HAVE_LLIST
7377
/* llist.h is officially defined since linux 3.1,
7478
* but centos6 have it backported on its 2.6.32.el6 */

0 commit comments

Comments
 (0)