From: Tony Ambardar Date: Wed, 6 Mar 2024 00:27:42 +0000 (-0800) Subject: trace: use standard POSIX header for basename() X-Git-Url: http://git.openwrt.org/?p=project%2Fprocd.git;a=commitdiff_plain trace: use standard POSIX header for basename() The musl libc only implements POSIX basename() but provided a GNU header kludge in , which was removed in musl 1.2.5 [1]. Use the standard header to avoid compilation errors like: trace/trace.c: In function 'main': trace/trace.c:435:64: error: implicit declaration of function 'basename'; did you mean 'rename'? [-Werror=implicit-function-declaration] 435 | if (asprintf(&json, "/tmp/%s.%u.json", basename(*argv), child) < 0) | ^~~~~~~~ | rename cc1: all warnings being treated as errors Link 1: https://git.musl-libc.org/cgit/musl/log/?qt=grep&q=basename Signed-off-by: Tony Ambardar --- diff --git a/trace/trace.c b/trace/trace.c index 6fd321f..e257d89 100644 --- a/trace/trace.c +++ b/trace/trace.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include