]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/blob - contrib/bind9/lib/bind/bsd/strdup.c
Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.
[FreeBSD/releng/7.2.git] / contrib / bind9 / lib / bind / bsd / strdup.c
1 #include "port_before.h"
2
3 #include <stdlib.h>
4
5 #include "port_after.h"
6
7 #ifndef NEED_STRDUP
8 int __bind_strdup_unneeded;
9 #else
10 char *
11 strdup(const char *src) {
12         char *dst = malloc(strlen(src) + 1);
13
14         if (dst)
15                 strcpy(dst, src);
16         return (dst);
17 }
18 #endif
19
20 /*! \file */