From 832ea1cfb12cb3de60568c8292480faf451a5ce6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Groenvall?= Date: Sat, 26 Aug 1995 12:40:32 +0000 Subject: [PATCH] Initial revision git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@83 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/roken/strdup.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 lib/roken/strdup.c 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