summaryrefslogtreecommitdiff
path: root/libexec/ld.so/strdup.c
blob: 1a277ca0554afe3641524c87d61f3b0ab472e4c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*	$OpenBSD: strdup.c,v 1.4 2001/06/08 06:49:19 art Exp $	*/

#include <string.h>
#include <sys/types.h>
#include "archdep.h"

void * _dl_malloc(int);

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