diff options
| author | Jafar Al-Gharaibeh <jafar@atcorp.com> | 2024-08-23 00:34:00 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-23 00:34:00 -0400 |
| commit | 83a60e7e20449b04a996ba53bd43c1659b6fbc0f (patch) | |
| tree | 50a2454973b7421b0c318f0a3f6c0e2161a52cd1 | |
| parent | 8f6c7c39e7bd89bfd9bcf6d769ee430ce7b583ef (diff) | |
| parent | 0ef71391f0fb15039550a09c218977fa3e1abaf1 (diff) | |
Merge pull request #15561 from kraj/master
Mimic GNU basename() API for non-glibc library e.g. musl
| -rw-r--r-- | zebra/zebra_netns_notify.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/zebra/zebra_netns_notify.c b/zebra/zebra_netns_notify.c index fb326b0ddf..3ac4fdd737 100644 --- a/zebra/zebra_netns_notify.c +++ b/zebra/zebra_netns_notify.c @@ -42,6 +42,10 @@ #define ZEBRA_NS_POLLING_INTERVAL_MSEC 1000 #define ZEBRA_NS_POLLING_MAX_RETRIES 200 +#if !defined(__GLIBC__) +#define basename(src) (strrchr(src, '/') ? strrchr(src, '/') + 1 : src) +#endif + DEFINE_MTYPE_STATIC(ZEBRA, NETNS_MISC, "ZebraNetNSInfo"); static struct event *zebra_netns_notify_current; |
