Skip to content

Commit

Permalink
drcpserver: fix windows build
Browse files Browse the repository at this point in the history
Change-Id: Ia4d2d138ece4a5b6d736e5e72405960191ac9ff1
  • Loading branch information
egonelbre committed Sep 16, 2021
1 parent 885db27 commit a3f0249
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
9 changes: 8 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ pipeline {
agent {
docker {
label 'main'
image docker.build("storj-ci", "--pull git://github.com/storj/ci.git#main").id
image 'storjlabs/ci:latest'
alwaysPull true
args '-u root:root --cap-add SYS_PTRACE -v "/tmp/gomod":/go/pkg/mod'
}
}
Expand Down Expand Up @@ -33,6 +34,12 @@ pipeline {
sh 'make lint'
}
}

stage('Vet') {
steps {
sh 'make vet'
}
}
}

post {
Expand Down
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ lint:
.PHONY: vet
vet:
./scripts/run.sh '*' go vet ./...
GOOS=linux GOARCH=386 ./scripts/run.sh '*' go vet ./...
GOOS=linux GOARCH=amd64 ./scripts/run.sh '*' go vet ./...
GOOS=linux GOARCH=arm ./scripts/run.sh '*' go vet ./...
GOOS=linux GOARCH=arm64 ./scripts/run.sh '*' go vet ./...
GOOS=windows GOARCH=386 ./scripts/run.sh '*' go vet ./...
GOOS=windows GOARCH=amd64 ./scripts/run.sh '*' go vet ./...
GOOS=windows GOARCH=arm64 ./scripts/run.sh '*' go vet ./...
GOOS=darwin GOARCH=amd64 ./scripts/run.sh '*' go vet ./...
GOOS=darwin GOARCH=arm64 ./scripts/run.sh '*' go vet ./...

.PHONY: test
test:
Expand Down
3 changes: 2 additions & 1 deletion drpcserver/util_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"errors"
"net"
"os"
"syscall"
)

const (
Expand All @@ -30,7 +31,7 @@ func isTemporary(err error) bool {
}

var sErr *os.SyscallError
if errors.As(nErr.Err, &sErr) {
if errors.As(err, &sErr) {
switch sErr.Err {
case _WSAENETRESET,
_WSAEMFILE,
Expand Down

0 comments on commit a3f0249

Please sign in to comment.