Skip to content

Commit dd072f3

Browse files
committed
core/overreach: grab environ from syscall
1 parent 9d2ed7a commit dd072f3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

intra/core/overreach.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66

77
package core
88

9-
import _ "unsafe" // required for go:linkname
9+
import (
10+
"syscall"
11+
_ "unsafe"
12+
) // required for go:linkname
1013

1114
//go:linkname runtimeGoTraceback gotraceback
1215
func runtimeGoTraceback() (level int32, all, crash bool)
@@ -16,13 +19,10 @@ func GoTraceback() (level int32, all, crash bool) {
1619
return runtimeGoTraceback()
1720
}
1821

19-
//go:linkname runtimeEnviron runtime.environ
20-
func runtimeEnviron() []string
21-
2222
// RuntimeEnviron returns the Go runtime's cached environment slice.
2323
//
2424
// Warning: building with this file enabled requires disabling the linker's
2525
// linkname checks: `-ldflags=-checklinkname=0`.
2626
func RuntimeEnviron() []string {
27-
return runtimeEnviron()
27+
return syscall.Environ()
2828
}

0 commit comments

Comments
 (0)