From 7b288f4353044d70a515cd5541f5e81b284b0eea Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Thu, 9 Dec 2021 19:44:59 +0300 Subject: [PATCH] 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 --- cancelreader_bsd.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cancelreader_bsd.go b/cancelreader_bsd.go index 0f6653a..c6154f0 100644 --- a/cancelreader_bsd.go +++ b/cancelreader_bsd.go @@ -1,3 +1,4 @@ +//go:build darwin || freebsd || netbsd || openbsd // +build darwin freebsd netbsd openbsd // nolint:revive @@ -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()):