summaryrefslogtreecommitdiff
path: root/pceplib/test/pcep_utils_queue_test.c
diff options
context:
space:
mode:
authorGeorgi Valkov <gvalkov@gmail.com>2024-06-04 13:35:54 +0300
committerGeorgi Valkov <gvalkov@gmail.com>2024-06-04 13:35:57 +0300
commitf7242fbf73b9142456bedad9dc59c80d46f3d004 (patch)
treea464bda88071e4dda16ba3b62c267b55a7498bce /pceplib/test/pcep_utils_queue_test.c
parent41eb06801c47d957c24d6a14e116c958454d433a (diff)
zebra: fix compilation with GCC14
Fixes: zebra/zebra_netns_notify.c: In function 'zebra_ns_ready_read': zebra/zebra_netns_notify.c:266:40: error: implicit declaration of function 'basename' [-Wimplicit-function-declaration] 266 | if (strmatch(VRF_DEFAULT_NAME, basename(netnspath))) { | ^~~~~~~~ Fixed by including libgen.h, then since basename may modify its parameter, allocate a copy on the stack, using strdupa, and pass the temporary string to basename. According to the man page for basename: With glibc, one gets the POSIX version of basename() when <libgen.h> is included, and the GNU version otherwise. The POSIX version of basename may modify the contents of path, so we should to pass a copy when calling this function. [1] https://man7.org/linux/man-pages/man3/basename.3.html Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
Diffstat (limited to 'pceplib/test/pcep_utils_queue_test.c')
0 files changed, 0 insertions, 0 deletions