Apply vodz' last_patch52
[oweals/busybox.git] / libbb / dirname.c
index 87db1f24f8b33730276db9f2312b23e60af94324..df9a49daa77c9341d360ffe78b3e9d1ce5b24b92 100644 (file)
 #include <string.h>
 #include "libbb.h"
 
+#if defined __UCLIBC__ || __GNU_LIBRARY___ < 5
+
 /* Return a string containing the path name of the parent
  * directory of PATH.  */
 
-char *dirname(const char *path)
+char *dirname(char *path)
 {
-       const char *s;
+       char *s;
 
        /* Go to the end of the string.  */
        s = path + strlen(path) - 1;
@@ -49,3 +51,5 @@ char *dirname(const char *path)
        s[1] = '\0';
        return path;
 }
+
+#endif