xref: /illumos-gate/usr/src/lib/libresolv2/common/bsd/putenv.c (revision 4c28a617e3922d92a58e813a5b955eb526b9c386)
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