new file mode 100644
@@ -0,0 +1,35 @@
+From 73c21bafc7065f0ab1d40fee2c6ce0c140d1b859 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 15 Mar 2024 11:31:02 -0700
+Subject: [PATCH] Mimic GNU basename() API for non-glibc library e.g. musl
+
+musl only provides POSIX version of basename and it has also removed
+providing it via string.h header [1] which now results in compile errors
+with newer compilers e.g. clang-18
+
+[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7
+
+Upstream-Status: Submitted [https://github.com/FRRouting/frr/pull/15561]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/zebra.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/lib/zebra.h b/lib/zebra.h
+index 15a54f6cdf..cc40b48339 100644
+--- a/lib/zebra.h
++++ b/lib/zebra.h
+@@ -226,6 +226,10 @@ struct in_pktinfo {
+
+ #define strmatch(a,b) (!strcmp((a), (b)))
+
++#if !defined(__GLIBC__)
++#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src)
++#endif
++
+ #if BYTE_ORDER == LITTLE_ENDIAN
+ #define htonll(x) (((uint64_t)htonl((x)&0xFFFFFFFF) << 32) | htonl((x) >> 32))
+ #define ntohll(x) (((uint64_t)ntohl((x)&0xFFFFFFFF) << 32) | ntohl((x) >> 32))
+--
+2.44.0
+
@@ -12,9 +12,10 @@ LIC_FILES_CHKSUM = "file://doc/licenses/GPL-2.0;md5=b234ee4d69f5fce4486a80fdaf4a
SRC_URI = "git://github.com/FRRouting/frr.git;protocol=https;branch=stable/9.1 \
file://frr.pam \
+ file://0001-Mimic-GNU-basename-API-for-non-glibc-library-e.g.-mu.patch \
"
-SRCREV = "312faf8008bb4f3b9e84b8e2758cd2cbdf5742b5"
+SRCREV = "ca2d6f0f1e000951224a18973cc1827f7f5215b5"
UPSTREAM_CHECK_GITTAGREGEX = "frr-(?P<pver>\d+(\.\d+)+)$"
Fix build with latest musl Signed-off-by: Khem Raj <raj.khem@gmail.com> --- ...me-API-for-non-glibc-library-e.g.-mu.patch | 35 +++++++++++++++++++ .../recipes-protocols/frr/frr_9.1.bb | 3 +- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 meta-networking/recipes-protocols/frr/frr/0001-Mimic-GNU-basename-API-for-non-glibc-library-e.g.-mu.patch