Fix build with latest musl Signed-off-by: Khem Raj <[email protected]> --- ...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
diff --git a/meta-networking/recipes-protocols/frr/frr/0001-Mimic-GNU-basename-API-for-non-glibc-library-e.g.-mu.patch b/meta-networking/recipes-protocols/frr/frr/0001-Mimic-GNU-basename-API-for-non-glibc-library-e.g.-mu.patch new file mode 100644 index 0000000000..215d6b4137 --- /dev/null +++ b/meta-networking/recipes-protocols/frr/frr/0001-Mimic-GNU-basename-API-for-non-glibc-library-e.g.-mu.patch @@ -0,0 +1,35 @@ +From 73c21bafc7065f0ab1d40fee2c6ce0c140d1b859 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +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 <[email protected]> +--- + 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 + diff --git a/meta-networking/recipes-protocols/frr/frr_9.1.bb b/meta-networking/recipes-protocols/frr/frr_9.1.bb index 8ea917afaa..4510c27060 100644 --- a/meta-networking/recipes-protocols/frr/frr_9.1.bb +++ b/meta-networking/recipes-protocols/frr/frr_9.1.bb @@ -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+)+)$" -- 2.44.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#109346): https://lists.openembedded.org/g/openembedded-devel/message/109346 Mute This Topic: https://lists.openembedded.org/mt/104954208/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
