Repository : ssh://git@diktynna/batman-adv
On branches: main,stable,main,stable
>---------------------------------------------------------------
commit 8924adbdf993cd0521f9d0024b43e3b23af5114f
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Tue Jul 11 11:46:30 2023 +0200
batman-adv: compat: Use native kstrtox.h for 5.10.185
Upstream stable commit 6e2e551e39fd ("kernel.h: split out kstrtox() and
simple_strtox() to a separate header") backported the support for
linux/kstrtox.h. Unfortunately, the compat support via linux/kernel.h was
dropped and thus references to kstrtou64 caused build errors
batman-adv/net/batman-adv/gateway_common.c: In function ‘batadv_parse_throughput’:
batman-adv/net/batman-adv/gateway_common.c:55:15: error: implicit declaration of function ‘kstrtou64’ [-Werror=implicit-function-declaration]
55 | ret = kstrtou64(buff, 10, <hroughput);
| ^~~~~~~~~
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
>---------------------------------------------------------------
8924adbdf993cd0521f9d0024b43e3b23af5114f
compat-include/linux/kstrtox.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/compat-include/linux/kstrtox.h b/compat-include/linux/kstrtox.h
index cd152e4b..3b6bae2f 100644
--- a/compat-include/linux/kstrtox.h
+++ b/compat-include/linux/kstrtox.h
@@ -11,7 +11,8 @@
#define _NET_BATMAN_ADV_COMPAT_LINUX_KSTRTOX_H_
#include <linux/version.h>
-#if LINUX_VERSION_IS_GEQ(5, 14, 0)
+#if (LINUX_VERSION_IS_GEQ(5, 10, 185) && LINUX_VERSION_IS_LESS(5, 11, 0)) || \
+ LINUX_VERSION_IS_GEQ(5, 14, 0)
#include_next <linux/kstrtox.h>
#else
#include <linux/kernel.h>