runtime: Correct syscall.Setenv for systems that don't have setenv.

From-SVN: r186911
This commit is contained in:
Ian Lance Taylor 2012-04-27 16:28:21 +00:00
parent 7f5f5f98c5
commit f07bb470ae

View File

@ -50,7 +50,7 @@ setenv_c (struct __go_string k, struct __go_string v)
#else /* !defined(HAVE_SETENV) */
kn = malloc (k.__length + v.__length + 2);
kn = __go_alloc (k.__length + v.__length + 2);
__builtin_memcpy (kn, ks, k.__length);
kn[k.__length] = '=';
__builtin_memcpy (kn + k.__length + 1, vs, v.__length);