From 82b2684e9b2c8a82232a0a31ed3d5b506bf1dd3a 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 4f254629..2470d064 100644 --- a/kmod/src/Makefile.kernelcompat +++ b/kmod/src/Makefile.kernelcompat @@ -519,3 +519,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 e4791980..a12c8e1f 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 e1b5fb90..d6ffc10f 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"