diff options
Diffstat (limited to 'libgo/runtime/env_posix.c')
-rw-r--r-- | libgo/runtime/env_posix.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libgo/runtime/env_posix.c b/libgo/runtime/env_posix.c index 3219550af9..ee3e451455 100644 --- a/libgo/runtime/env_posix.c +++ b/libgo/runtime/env_posix.c @@ -2,12 +2,14 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build darwin dragonfly freebsd linux netbsd openbsd windows +// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows #include "runtime.h" #include "array.h" +#include "arch.h" +#include "malloc.h" -extern Slice syscall_Envs __asm__ (GOSYM_PREFIX "syscall.Envs"); +extern Slice envs; const byte* runtime_getenv(const char *s) @@ -20,8 +22,8 @@ runtime_getenv(const char *s) bs = (const byte*)s; len = runtime_findnull(bs); - envv = (String*)syscall_Envs.__values; - envc = syscall_Envs.__count; + envv = (String*)envs.__values; + envc = envs.__count; for(i=0; i<envc; i++){ if(envv[i].len <= len) continue; |