repo.or.cz
/
dragonfly.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Add BIND 9.2.4rc7.
[dragonfly.git]
/
contrib
/
bind-9.2.4rc7
/
lib
/
bind
/
bsd
/
strdup.c
blob
246bc1f49fc26867cf047b40e2c33384a0f1dcc8
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