From 27d68e86c3080d8e7848ee2c33f8470ed28e5afd Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Mon, 21 Apr 2025 22:47:42 -0400 Subject: [PATCH] unaligned.h moved from asm/ to linux/ In v6.12-rc1-3-g5f60d5f6bbc1, asm/unaligned.h only included asm-generic/unaligned.h and that was cleaned up from architecture specific things. Everyone should now include linux/unaligned.h and the former include was removed. A quick peek at server.c shows that while included, it no longer uses any function from this header at all, so it can just be dropped. Signed-off-by: Auke Kok --- kmod/src/Makefile.kernelcompat | 8 ++++++++ kmod/src/server.c | 1 - kmod/src/srch.c | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/kmod/src/Makefile.kernelcompat b/kmod/src/Makefile.kernelcompat index 170ddab7..bbdd8cbd 100644 --- a/kmod/src/Makefile.kernelcompat +++ b/kmod/src/Makefile.kernelcompat @@ -457,3 +457,11 @@ endif ifneq (,$(shell grep 'inline time64_t inode_get_atime_sec' include/linux/fs.h)) ccflags-y += -DKC_FS_INODE_AM_TIME_ACCESSOR endif + +# +# v6.12-rc1-3-g5f60d5f6bbc1 +# +# asm/unaligned.h replaced with linux/unaligned.h +ifneq (,$(shell grep -s 'define __LINUX_UNALIGNED_H' include/linux/unaligned.h)) +ccflags-y += -DKC_HAVE__LINUX_UNALIGNED_H +endif diff --git a/kmod/src/server.c b/kmod/src/server.c index f4e09031..b4fbd58a 100644 --- a/kmod/src/server.c +++ b/kmod/src/server.c @@ -20,7 +20,6 @@ #include #include #include -#include #include "format.h" #include "counters.h" diff --git a/kmod/src/srch.c b/kmod/src/srch.c index 99ea6448..d8b2ba35 100644 --- a/kmod/src/srch.c +++ b/kmod/src/srch.c @@ -18,7 +18,11 @@ #include #include #include +#ifdef KC_HAVE__LINUX_UNALIGNED_H +#include +#else #include +#endif #include "super.h" #include "format.h"