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