aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2012-04-27 16:28:21 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-04-27 16:28:21 +0000
commitf07bb470aeab62b605103453e28b4d55909e9928 (patch)
treea52ccf0ef0705707e7aff8b35ce74d3e9fcafe5e /libgo/runtime
parent7f5f5f98c5c21e263884362a248e5891e98ac6bc (diff)
downloadgcc-f07bb470aeab62b605103453e28b4d55909e9928.zip
gcc-f07bb470aeab62b605103453e28b4d55909e9928.tar.gz
gcc-f07bb470aeab62b605103453e28b4d55909e9928.tar.bz2
runtime: Correct syscall.Setenv for systems that don't have setenv.
From-SVN: r186911
Diffstat (limited to 'libgo/runtime')
-rw-r--r--libgo/runtime/go-setenv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libgo/runtime/go-setenv.c b/libgo/runtime/go-setenv.c
index 78717f4..a62796b 100644
--- a/libgo/runtime/go-setenv.c
+++ b/libgo/runtime/go-setenv.c
@@ -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);