Przeglądaj źródła

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>
Tobias Klauser 8 lat temu
rodzic
commit
e769da88e6
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      cmd/dockerd/service_windows.go

+ 1 - 1
cmd/dockerd/service_windows.go

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