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