summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/socket/rpcinet/notifier/notifier.go
diff options
context:
space:
mode:
authorHaibo Xu <haibo.xu@arm.com>2019-08-05 03:16:50 +0000
committerHaibo Xu <haibo.xu@arm.com>2019-08-05 23:10:08 +0000
commit83fdb7739e2da5636147bac89d2508be507801dc (patch)
treeafb65ce118d58a73486d66cf1e0d16dcd4440934 /pkg/sentry/socket/rpcinet/notifier/notifier.go
parent960a5e5536d5d961028ef60123e3b00ff3c04a56 (diff)
Change syscall.EPOLLET to unix.EPOLLET
syscall.EPOLLET has been defined with different values on amd64 and arm64(-0x80000000 on amd64, and 0x80000000 on arm64), while unix.EPOLLET has been unified this value to 0x80000000(golang/go#5328). ref #63 Signed-off-by: Haibo Xu <haibo.xu@arm.com> Change-Id: Id97d075c4e79d86a2ea3227ffbef02d8b00ffbb8
Diffstat (limited to 'pkg/sentry/socket/rpcinet/notifier/notifier.go')
-rw-r--r--pkg/sentry/socket/rpcinet/notifier/notifier.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/sentry/socket/rpcinet/notifier/notifier.go b/pkg/sentry/socket/rpcinet/notifier/notifier.go
index aa157dd51..7efe4301f 100644
--- a/pkg/sentry/socket/rpcinet/notifier/notifier.go
+++ b/pkg/sentry/socket/rpcinet/notifier/notifier.go
@@ -20,6 +20,7 @@ import (
"sync"
"syscall"
+ "golang.org/x/sys/unix"
"gvisor.dev/gvisor/pkg/sentry/socket/rpcinet/conn"
pb "gvisor.dev/gvisor/pkg/sentry/socket/rpcinet/syscall_rpc_go_proto"
"gvisor.dev/gvisor/pkg/waiter"
@@ -76,7 +77,7 @@ func (n *Notifier) waitFD(fd uint32, fi *fdInfo, mask waiter.EventMask) error {
}
e := pb.EpollEvent{
- Events: mask.ToLinux() | -syscall.EPOLLET,
+ Events: mask.ToLinux() | unix.EPOLLET,
Fd: fd,
}