From 3b8dd4bd632c8874a696222144574f6be6e1662a Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Wed, 11 Mar 2020 09:12:52 +0100 Subject: [PATCH 1/2] travis: cross-compile windows --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 96a7312f8..94d28281a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,6 +43,7 @@ jobs: - make unit pkg=... case=_NONE_ - make lint - make btcd + - LNDBUILDSYS=windows-amd64 bash ./build/release/release.sh - stage: Test script: make travis-cover name: Unit Cover From f55860ccd8108a1133c0ba47e1f711267e175a6b Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Wed, 11 Mar 2020 09:15:04 +0100 Subject: [PATCH 2/2] lncli: fix windows compilation --- cmd/lncli/commands.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/lncli/commands.go b/cmd/lncli/commands.go index 1031c2524..36ebe97dd 100644 --- a/cmd/lncli/commands.go +++ b/cmd/lncli/commands.go @@ -1807,7 +1807,11 @@ func unlock(ctx *cli.Context) error { // lncli. default: fmt.Printf("Input wallet password: ") - pw, err = terminal.ReadPassword(syscall.Stdin) + + // The variable syscall.Stdin is of a different type in the + // Windows API that's why we need the explicit cast. And of + // course the linter doesn't like it either. + pw, err = terminal.ReadPassword(int(syscall.Stdin)) // nolint:unconvert fmt.Println() } if err != nil {