diff --git a/lib/roken/strdup.c b/lib/roken/strdup.c new file mode 100644 index 000000000..146d1ea8b --- /dev/null +++ b/lib/roken/strdup.c @@ -0,0 +1,12 @@ +#include "bsd_locl.h" + +#ifndef HAVE_STRDUP +static char * +strdup(const char *old) +{ + char *t = malloc(strlen(old)+1); + if (t != 0) + strcpy(t, old); + return t; +} +#endif