xref: /illumos-gate/usr/src/lib/libresolv2/common/bsd/putenv.c (revision 66582b606a8194f7f3ba5b3a3a6dca5b0d346361)
1 #include "port_before.h"
2 #include "port_after.h"
3 
4 /*%
5  * To give a little credit to Sun, SGI,
6  * and many vendors in the SysV world.
7  */
8 
9 #if !defined(NEED_PUTENV)
10 int __bindcompat_putenv;
11 #else
12 int
13 putenv(char *str) {
14 	char *tmp;
15 
16 	for (tmp = str; *tmp && (*tmp != '='); tmp++)
17 		;
18 
19 	return (setenv(str, tmp, 1));
20 }
21 #endif
22 
23 /*! \file */
24