1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Windows: fix build after re-vendoring golang.org/x/sys

Due to the CL https://go-review.googlesource.com/c/39608/ in
x/sys/windows which changed the definitions of STD_INPUT_HANDLE,
STD_OUTPUT_HANDLE and STD_ERROR_HANDLE, we get the following failure
in cmd/dockerd/service_windows.go after re-vendoring x/sys/windows:

  06:29:57 # github.com/docker/docker/cmd/dockerd
  06:29:57 .\service_windows.go:400: cannot use sh (type int) as type uint32 in argument to windows.GetStdHandle

Fix it by adding an explicit type conversion when calling
windows.GetStdHandle.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
This commit is contained in:
Tobias Klauser 2017-07-12 14:49:06 +02:00
parent bd13a5a9e0
commit e769da88e6

View file

@ -397,7 +397,7 @@ func initPanicFile(path string) error {
// it when it panics. Remember the old stderr to restore it before removing // it when it panics. Remember the old stderr to restore it before removing
// the panic file. // the panic file.
sh := windows.STD_ERROR_HANDLE sh := windows.STD_ERROR_HANDLE
h, err := windows.GetStdHandle(sh) h, err := windows.GetStdHandle(uint32(sh))
if err != nil { if err != nil {
return err return err
} }