From 841de809bb9d36ea7949b67857978d35f4fcc2f2 Mon Sep 17 00:00:00 2001 From: Alex Brainman Date: Fri, 21 Nov 2014 15:59:22 +1100 Subject: [PATCH] [dev.cc] runtime: windows does not use _cgo_setenv and _cgo_unsetenv LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/175480043 --- src/runtime/proc.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/runtime/proc.go b/src/runtime/proc.go index 50920afe8b..295190cb4e 100644 --- a/src/runtime/proc.go +++ b/src/runtime/proc.go @@ -63,11 +63,13 @@ func main() { if _cgo_free == nil { gothrow("_cgo_free missing") } - if _cgo_setenv == nil { - gothrow("_cgo_setenv missing") - } - if _cgo_unsetenv == nil { - gothrow("_cgo_unsetenv missing") + if GOOS != "windows" { + if _cgo_setenv == nil { + gothrow("_cgo_setenv missing") + } + if _cgo_unsetenv == nil { + gothrow("_cgo_unsetenv missing") + } } } -- 2.48.1