Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
trace: use standard POSIX header for basename()
The musl libc only implements POSIX basename() but provided a GNU header kludge in <string.h>, which was removed in musl 1.2.5 [1]. Use the standard <libgen.h> 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 <[email protected]>
- Loading branch information