summaryrefslogtreecommitdiff
path: root/libexec/ld.so/strdup.c
blob: c5d7615b2cb33b6c8df1f4e98af068949ef73746 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/*	$OpenBSD: strdup.c,v 1.3 2001/04/02 23:11:21 drahn Exp $	*/

#include <string.h>

void * _dl_malloc(int);

char *
_dl_strdup(const char *orig)
{
	char *newstr;
	newstr = _dl_malloc(strlen(orig)+1);
	strcpy(newstr, orig);
	return (newstr);
}