From 1decf764718f66097ce5bbfe2cd14a883a4ef713 Mon Sep 17 00:00:00 2001 From: Haibo Xu Date: Tue, 30 Jul 2019 10:59:57 -0700 Subject: Change syscall.POLL to syscall.PPOLL. syscall.POLL is not supported on arm64, using syscall.PPOLL to support both the x86 and arm64. refs #63 Signed-off-by: Haibo Xu Change-Id: I2c81a063d3ec4e7e6b38fe62f17a0924977f505e COPYBARA_INTEGRATE_REVIEW=https://github.com/google/gvisor/pull/543 from xiaobo55x:master ba598263fd3748d1addd48e4194080aa12085164 PiperOrigin-RevId: 260752049 --- pkg/unet/unet_unsafe.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'pkg/unet') diff --git a/pkg/unet/unet_unsafe.go b/pkg/unet/unet_unsafe.go index 614448954..85ef46edf 100644 --- a/pkg/unet/unet_unsafe.go +++ b/pkg/unet/unet_unsafe.go @@ -16,7 +16,6 @@ package unet import ( "io" - "math" "sync/atomic" "syscall" "unsafe" @@ -53,7 +52,7 @@ func (s *Socket) wait(write bool) error { events[0].Events = unix.POLLOUT } - _, _, e := syscall.Syscall(syscall.SYS_POLL, uintptr(unsafe.Pointer(&events[0])), 2, uintptr(math.MaxUint64)) + _, _, e := syscall.Syscall6(syscall.SYS_PPOLL, uintptr(unsafe.Pointer(&events[0])), 2, 0, 0, 0, 0) if e == syscall.EINTR { continue } -- cgit v1.2.3