Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
musl: basename: use portable implementation for basename API
musl has removed the non-prototype declaration of basename from string.h which now results in build errors with newer clang compilers. Implement GNU basename behavior using strchr which is portable across libcs. Fixes: | ../../git/tools/mountcomposefs.c:43:20: | error: call to undeclared function 'basename'; ISO C99 and later do not | support implicit function declarations [-Wimplicit-function-declaration] | 43 | const char *bin = basename(argv0); | | ^ | ../../git/tools/mountcomposefs.c:43:14: | error: incompatible integer to pointer conversion initializing 'const char *' | with an expression of type 'int' [-Wint-conversion] | 43 | const char *bin = basename(argv0); | | ^ ~~~~~~~~~~~~~~~ For reference: https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 Closes: #272 Signed-off-by: Fathi Boudra <[email protected]>
- Loading branch information