summaryrefslogtreecommitdiffhomepage
path: root/pkg/fdnotifier/fdnotifier.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/fdnotifier/fdnotifier.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/fdnotifier/fdnotifier.go')
-rw-r--r--pkg/fdnotifier/fdnotifier.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/fdnotifier/fdnotifier.go b/pkg/fdnotifier/fdnotifier.go
index 58529f99f..f4aae1953 100644
--- a/pkg/fdnotifier/fdnotifier.go
+++ b/pkg/fdnotifier/fdnotifier.go
@@ -25,6 +25,7 @@ import (
"sync"
"syscall"
+ "golang.org/x/sys/unix"
"gvisor.dev/gvisor/pkg/waiter"
)
@@ -72,7 +73,7 @@ func (n *notifier) waitFD(fd int32, fi *fdInfo, mask waiter.EventMask) error {
}
e := syscall.EpollEvent{
- Events: mask.ToLinux() | -syscall.EPOLLET,
+ Events: mask.ToLinux() | unix.EPOLLET,
Fd: fd,
}