blob: d92ed9e91d2e8908ec024131d4e1b6fd35beb23d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
/*
* Copyright (c) 1997, by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "port_before.h"
#include <stdlib.h>
#include "port_after.h"
#ifndef NEED_STRDUP
int __bind_strdup_unneeded;
#else
char *
strdup(const char *src) {
char *dst = malloc(strlen(src) + 1);
if (dst)
strcpy(dst, src);
return (dst);
}
#endif
|