From 0aca212a95ad113c244314add3cff69b5b6109c6 Mon Sep 17 00:00:00 2001 From: Janusz Dziedzic Date: Tue, 26 May 2026 13:19:54 +0200 Subject: [PATCH] batman-adv: fix kmalloc_obj redefinition on stable 6.18.33+ Linux 6.18.33 stable backported kmalloc_obj/kmalloc_objs/kzalloc_obj, causing a redefinition conflict with compat-hacks.h which also defines these for kernels before 7.0.0. Exclude the 6.18.33-6.18.x stable range from the backport definitions. Signed-off-by: Janusz Dziedzic --- batman-adv/Makefile | 2 +- batman-adv/src/compat-hacks.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/batman-adv/Makefile b/batman-adv/Makefile index 86ca1d3..2086215 100644 --- a/batman-adv/Makefile +++ b/batman-adv/Makefile @@ -4,7 +4,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=batman-adv PKG_VERSION:=2026.1 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION) diff --git a/batman-adv/src/compat-hacks.h b/batman-adv/src/compat-hacks.h index e3bc5ee..0cfaf63 100644 --- a/batman-adv/src/compat-hacks.h +++ b/batman-adv/src/compat-hacks.h @@ -46,7 +46,8 @@ static inline u32 batadv_skb_crc32c(struct sk_buff *skb, int offset, #endif /* LINUX_VERSION_IS_LESS(6, 16, 0) || !defined(CONFIG_NET_CRC32C) */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(7, 0, 0) +#if LINUX_VERSION_IS_LESS(7, 0, 0) && \ + !(LINUX_VERSION_IS_GEQ(6, 18, 33) && LINUX_VERSION_IS_LESS(6, 19, 0)) #define kzalloc_obj(P, GFP) \ kzalloc(sizeof(P), GFP)