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 authored and muesli committed Dec 11, 2021
1 parent cf3955f commit 7b288f4
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 7b288f4

Please sign in to comment.