Skip to content

Commit

Permalink
Add cancelreader bsd go1.17 compilation flags
Browse files Browse the repository at this point in the history
and fix "in switch on ident (mismatched types uint64 and uint32)" error
when building for 32-bit bsd
  • Loading branch information
aymanbagabas committed Dec 9, 2021
1 parent a55bf77 commit 56ea707
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cancelreader_bsd.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build darwin || freebsd || netbsd || openbsd
// +build darwin freebsd netbsd openbsd

// nolint:revive
Expand Down Expand Up @@ -133,7 +134,8 @@ func (r *kqueueCancelReader) wait() error {
break
}

switch events[0].Ident {
ident := uint64(events[0].Ident)
switch ident {
case uint64(r.file.Fd()):
return nil
case uint64(r.cancelSignalReader.Fd()):
Expand Down

0 comments on commit 56ea707

Please sign in to comment.