batmand: Fix FTBFS with recent musl
authorSven Eckelmann <[email protected]>
Fri, 23 May 2025 09:22:03 +0000 (11:22 +0200)
committerElektra <[email protected]>
Fri, 23 May 2025 14:36:14 +0000 (16:36 +0200)
The build failed because various string functions couldn't be found. This
happened because the indirect include of string.h is now gone.

Signed-off-by: Sven Eckelmann <[email protected]>
batmand/Makefile
batmand/patches/0002-batmand-Add-missing-string.h-include.patch [new file with mode: 0644]

index f015d87d9933d3085515529c082ce9fb8b10c41c..42362a1909e588a54e426596514d52debe0b1ad1 100644 (file)
@@ -13,7 +13,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://git.open-mesh.org/batmand.git
 PKG_REV:=b67a7087b51d7a5e90d27ac39116d1f57257c86e
 PKG_VERSION:=1440
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=GPL-2.0
 
 PKG_SOURCE_VERSION:=$(PKG_REV)
diff --git a/batmand/patches/0002-batmand-Add-missing-string.h-include.patch b/batmand/patches/0002-batmand-Add-missing-string.h-include.patch
new file mode 100644 (file)
index 0000000..1630379
--- /dev/null
@@ -0,0 +1,50 @@
+From: Sven Eckelmann <[email protected]>
+Date: Fri, 23 May 2025 11:15:53 +0200
+Subject: batmand: Add missing string.h include
+
+The build failed because various string functions couldn't be found. This
+happened because the indirect include of string.h is now gone in musl
+1.2.5.
+
+Signed-off-by: Sven Eckelmann <[email protected]>
+
+--- a/hna.c
++++ b/hna.c
+@@ -27,6 +27,7 @@
+
+ #include <errno.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <arpa/inet.h>
+
+
+--- a/linux/kernel.c
++++ b/linux/kernel.c
+@@ -29,6 +29,7 @@
+ #include <sys/socket.h>
+ #include <inttypes.h>
+ #include <net/if.h>
++#include <string.h>
+
+ #include "../os.h"
+ #include "../batman.h"
+--- a/linux/route.c
++++ b/linux/route.c
+@@ -29,6 +29,7 @@
+ #include <linux/if.h>     /* ifr_if, ifr_tun */
+ #include <linux/netlink.h>
+ #include <linux/rtnetlink.h>
++#include <string.h>
+ #include <sys/socket.h>
+
+ #include "../os.h"
+--- a/linux/tun.c
++++ b/linux/tun.c
+@@ -32,6 +32,7 @@
+ #include <sys/socket.h>
+ #include <stdio.h>
+ #include <stdlib.h>       /* system() */
++#include <string.h>
+ #include <sys/wait.h>     /* WEXITSTATUS */
+
+ #include "../os.h"