projects
/
platform
/
upstream
/
toybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a4bd4b
)
fix non-glibc basename(3) usage
author
Elliott Hughes
<enh@google.com>
Sun, 18 Jan 2015 19:36:31 +0000
(13:36 -0600)
committer
Elliott Hughes
<enh@google.com>
Sun, 18 Jan 2015 19:36:31 +0000
(13:36 -0600)
I considered a #else on the big #ifdef __GLIBC__ above, but that
seemed harder to follow.
lib/portability.h
patch
|
blob
|
history
diff --git
a/lib/portability.h
b/lib/portability.h
index
f6f7672
..
bb1f5ae
100644
(file)
--- 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".