summaryrefslogtreecommitdiffstats
path: root/vendor/modernc.org/libc/libc.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/modernc.org/libc/libc.go')
-rw-r--r--vendor/modernc.org/libc/libc.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/vendor/modernc.org/libc/libc.go b/vendor/modernc.org/libc/libc.go
index 7831aea1..98d7c217 100644
--- a/vendor/modernc.org/libc/libc.go
+++ b/vendor/modernc.org/libc/libc.go
@@ -161,6 +161,10 @@ func X_exit(_ *TLS, status int32) {
}
func SetEnviron(t *TLS, env []string) {
+ if environInitialized {
+ return
+ }
+
environInitialized = true
p := Xcalloc(t, 1, types.Size_t((len(env)+1)*(int(uintptrSize))))
if p == 0 {