From ef590451a3ad1bb0f2ff302a9cc257aeb8640910 Mon Sep 17 00:00:00 2001 From: Mieczyslaw Nalewaj Date: Tue, 15 Apr 2025 20:03:04 +0200 Subject: [PATCH] generic: mtdsplit: include appropriate header for kernel 6.12 In kernel 6.12 asm/unaligned.h was moved to linux/unaligned.h[1] The patch points to the appropriate header depending on the kernel version. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.12.y&id=5f60d5f6bbc12e782fac78110b0ee62698f3b576 Signed-off-by: Mieczyslaw Nalewaj Link: https://github.com/openwrt/openwrt/pull/16547 Signed-off-by: Christian Marangi --- .../linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_lzma.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_lzma.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_lzma.c index c58f7ae4bf0..6dcffd04203 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_lzma.c +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_lzma.c @@ -14,8 +14,13 @@ #include #include #include +#include +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,12,0) #include +#else +#include +#endif #include "mtdsplit.h"