summaryrefslogtreecommitdiffhomepage
path: root/pkg/fdnotifier/poll_unsafe.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/fdnotifier/poll_unsafe.go')
-rw-r--r--pkg/fdnotifier/poll_unsafe.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkg/fdnotifier/poll_unsafe.go b/pkg/fdnotifier/poll_unsafe.go
index 8459d4c74..05be9aeb5 100644
--- a/pkg/fdnotifier/poll_unsafe.go
+++ b/pkg/fdnotifier/poll_unsafe.go
@@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+// +build linux
+
package fdnotifier
import (
@@ -30,7 +32,7 @@ func NonBlockingPoll(fd int32, mask waiter.EventMask) waiter.EventMask {
revents int16
}{
fd: fd,
- events: int16(mask),
+ events: int16(mask.ToLinux()),
}
for {
@@ -51,7 +53,7 @@ func NonBlockingPoll(fd int32, mask waiter.EventMask) waiter.EventMask {
}
// Otherwise we got the ready events in the revents field.
- return waiter.EventMask(e.revents)
+ return waiter.EventMaskFromLinux(uint32(e.revents))
}
}