From dc50676cce35cdba3ecba3870c3f752408d6db70 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Sat, 12 Feb 2011 22:26:57 -0800 Subject: Move stpcpy replacement function into libbb Signed-off-by: Dan Fandrich Signed-off-by: Denys Vlasenko --- libbb/platform.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libbb/platform.c') diff --git a/libbb/platform.c b/libbb/platform.c index ccde2bf02..fe7ce1567 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 -- cgit v1.2.3