summaryrefslogtreecommitdiff
path: root/libbb/dirname.c
diff options
context:
space:
mode:
authorMatt Kraai2001-08-24 20:35:45 +0000
committerMatt Kraai2001-08-24 20:35:45 +0000
commit80f6d55836963f4e85c297f2901161d0ff69b4cb (patch)
treed75333cf5a2360ef3f9fc16bf3099ac2461b45f3 /libbb/dirname.c
parentac20ce1924a0eb563acfda6533a80701cd611bfa (diff)
downloadbusybox-80f6d55836963f4e85c297f2901161d0ff69b4cb.zip
busybox-80f6d55836963f4e85c297f2901161d0ff69b4cb.tar.gz
Eliminate improper consts and allow standard version to override.
Diffstat (limited to 'libbb/dirname.c')
-rw-r--r--libbb/dirname.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libbb/dirname.c b/libbb/dirname.c
index 87db1f2..df9a49d 100644
--- a/libbb/dirname.c
+++ b/libbb/dirname.c
@@ -22,12 +22,14 @@
#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