diff options
author | Khem Raj <raj.khem@gmail.com> | 2024-03-15 14:43:03 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2024-03-17 13:10:11 -0700 |
commit | 3f08151bf460b0deeb05ca6984e284042b4dfd43 (patch) | |
tree | f872d51962ca7f3ded5545cd3921476e14e0d24f /meta-networking | |
parent | 704e3e0a3d2af3da99b9e1853c366dc85a9d3bc8 (diff) | |
download | meta-openembedded-3f08151bf460b0deeb05ca6984e284042b4dfd43.tar.gz |
frr: Fix build on newer musl
provide GNU like basename on non-glibc systems
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r-- | meta-networking/recipes-protocols/frr/frr/0001-zebra-Mimic-GNU-basename-API-for-non-glibc-library-e.patch | 34 | ||||
-rw-r--r-- | meta-networking/recipes-protocols/frr/frr_9.1.bb | 1 |
2 files changed, 35 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/frr/frr/0001-zebra-Mimic-GNU-basename-API-for-non-glibc-library-e.patch b/meta-networking/recipes-protocols/frr/frr/0001-zebra-Mimic-GNU-basename-API-for-non-glibc-library-e.patch new file mode 100644 index 000000000..8c83d5c8e --- /dev/null +++ b/meta-networking/recipes-protocols/frr/frr/0001-zebra-Mimic-GNU-basename-API-for-non-glibc-library-e.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From 49aeccbec4bf620bb594999bbd4a9de669a3984c Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 15 Mar 2024 14:34:06 -0700 | ||
4 | Subject: [PATCH] zebra: Mimic GNU basename() API for non-glibc library e.g. | ||
5 | musl musl only provides POSIX version of basename and it has also removed | ||
6 | providing it via string.h header [1] which now results in compile errors with | ||
7 | newer compilers e.g. clang-18 | ||
8 | |||
9 | [1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 | ||
10 | |||
11 | Upstream-Status: Submitted [https://github.com/FRRouting/frr/pull/15561/] | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | zebra/zebra_netns_notify.c | 4 ++++ | ||
15 | 1 file changed, 4 insertions(+) | ||
16 | |||
17 | diff --git a/zebra/zebra_netns_notify.c b/zebra/zebra_netns_notify.c | ||
18 | index 1bb1292e34..d55df2f62d 100644 | ||
19 | --- a/zebra/zebra_netns_notify.c | ||
20 | +++ b/zebra/zebra_netns_notify.c | ||
21 | @@ -41,6 +41,10 @@ | ||
22 | #define ZEBRA_NS_POLLING_INTERVAL_MSEC 1000 | ||
23 | #define ZEBRA_NS_POLLING_MAX_RETRIES 200 | ||
24 | |||
25 | +#if !defined(__GLIBC__) | ||
26 | +#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src) | ||
27 | +#endif | ||
28 | + | ||
29 | DEFINE_MTYPE_STATIC(ZEBRA, NETNS_MISC, "ZebraNetNSInfo"); | ||
30 | static struct event *zebra_netns_notify_current; | ||
31 | |||
32 | -- | ||
33 | 2.44.0 | ||
34 | |||
diff --git a/meta-networking/recipes-protocols/frr/frr_9.1.bb b/meta-networking/recipes-protocols/frr/frr_9.1.bb index bc9fc4f21..eea6d62f5 100644 --- a/meta-networking/recipes-protocols/frr/frr_9.1.bb +++ b/meta-networking/recipes-protocols/frr/frr_9.1.bb | |||
@@ -12,6 +12,7 @@ LIC_FILES_CHKSUM = "file://doc/licenses/GPL-2.0;md5=b234ee4d69f5fce4486a80fdaf4a | |||
12 | 12 | ||
13 | SRC_URI = "git://github.com/FRRouting/frr.git;protocol=https;branch=stable/9.1 \ | 13 | SRC_URI = "git://github.com/FRRouting/frr.git;protocol=https;branch=stable/9.1 \ |
14 | file://frr.pam \ | 14 | file://frr.pam \ |
15 | file://0001-zebra-Mimic-GNU-basename-API-for-non-glibc-library-e.patch \ | ||
15 | " | 16 | " |
16 | 17 | ||
17 | SRCREV = "ca2d6f0f1e000951224a18973cc1827f7f5215b5" | 18 | SRCREV = "ca2d6f0f1e000951224a18973cc1827f7f5215b5" |