Remove workaround for Nano server TP5
This workaround for golang/go#15286 was added for Nano server TP5 in fa82c0aa10cfac8c6d5e2446876dc79b2b0c1bf9, and should no longer be needed Due to a security fix in Go 1.9.4/1.8.7, loading the .dll is no longer allowed, and produces an error: .\docker_windows.go:9:3: //go:cgo_import_dynamic main.dummy CommandLineToArgvW%2 "shell32.dll" only allowed in cgo-generated code Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 250193387c98a4ad69a6591d5fe5a39c1409ffba Component: engine
This commit is contained in:
@ -1,18 +1,5 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"sync/atomic"
|
||||
|
||||
_ "github.com/docker/docker/autogen/winresources/dockerd"
|
||||
)
|
||||
|
||||
//go:cgo_import_dynamic main.dummy CommandLineToArgvW%2 "shell32.dll"
|
||||
|
||||
var dummy uintptr
|
||||
|
||||
func init() {
|
||||
// Ensure that this import is not removed by the linker. This is used to
|
||||
// ensure that shell32.dll is loaded by the system loader, preventing
|
||||
// go#15286 from triggering on Nano Server TP5.
|
||||
atomic.LoadUintptr(&dummy)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user