summaryrefslogtreecommitdiff
path: root/libbb/platform.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/platform.c')
-rw-r--r--libbb/platform.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libbb/platform.c b/libbb/platform.c
index ccde2bf..fe7ce15 100644
--- a/libbb/platform.c
+++ b/libbb/platform.c
@@ -134,3 +134,14 @@ char* FAST_FUNC strsep(char **stringp, const char *delim)
return start;
}
#endif
+
+#ifndef HAVE_STPCPY
+char* FAST_FUNC stpcpy(char *p, const char *to_add)
+{
+ while ((*p = *to_add) != '\0') {
+ p++;
+ to_add++;
+ }
+ return p;
+}
+#endif