xref: /illumos-gate/usr/src/lib/libresolv2/common/bsd/putenv.c (revision 458f44a49dc56cd17a39815122214e7a1b4793e3)
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
putenv(char * str)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