I considered a #else on the big #ifdef __GLIBC__ above, but that seemed harder to follow.
diff --git a/lib/portability.h b/lib/portability.h index 8bbbdb2..f262a93 100644 --- a/lib/portability.h +++ b/lib/portability.h @@ -141,6 +141,11 @@ int utimensat(int fd, const char *path, const struct timespec times[2], int flag #endif +#ifndef __GLIBC__ +// POSIX basename. +#include <libgen.h> +#endif + #ifdef __MUSL__ #include <unistd.h> // Without this "rm -r dir" fails with "is directory". _______________________________________________ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net