Add cancelreader bsd go1.17 compilation flags

and fix "in switch on ident (mismatched types uint64 and uint32)" error
when building for 32-bit bsd
This commit is contained in:
Ayman Bagabas 2021-12-09 19:44:59 +03:00 committed by Christian Muehlhaeuser
parent cf3955fbe2
commit 7b288f4353
1 changed files with 3 additions and 1 deletions

View File

@ -1,3 +1,4 @@
//go:build darwin || freebsd || netbsd || openbsd
// +build darwin freebsd netbsd openbsd // +build darwin freebsd netbsd openbsd
// nolint:revive // nolint:revive
@ -133,7 +134,8 @@ func (r *kqueueCancelReader) wait() error {
break break
} }
switch events[0].Ident { ident := uint64(events[0].Ident)
switch ident {
case uint64(r.file.Fd()): case uint64(r.file.Fd()):
return nil return nil
case uint64(r.cancelSignalReader.Fd()): case uint64(r.cancelSignalReader.Fd()):