changeset 1664:692be264d4f0

fix non-glibc basename(3) usage I considered a #else on the big #ifdef __GLIBC__ above, but that seemed harder to follow.
author Elliott Hughes <enh@google.com>
date Sun, 18 Jan 2015 13:36:31 -0600
parents 988f3d13b925
children 5d003cc2fa16
files lib/portability.h
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lib/portability.h	Fri Jan 16 13:55:32 2015 -0600
+++ b/lib/portability.h	Sun Jan 18 13:36:31 2015 -0600
@@ -141,6 +141,11 @@
 
 #endif
 
+#ifndef __GLIBC__
+// POSIX basename.
+#include <libgen.h>
+#endif
+
 #ifdef __MUSL__
 #include <unistd.h>
 // Without this "rm -r dir" fails with "is directory".