mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
fa82c0aa10
This works around golang/go#15286 by explicitly loading shell32.dll at load time, ensuring that syscall can load it dynamically during process startup. Signed-off-by: John Starks <jostarks@microsoft.com> Signed-off-by: Antonio Murdaca <runcom@redhat.com>
18 lines
429 B
Go
18 lines
429 B
Go
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)
|
|
}
|