diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-08-08 11:58:11 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-08-08 11:58:14 -0700 |
commit | 2e45d1696e41d9042164b1b05d0dcd39dd15dfce (patch) | |
tree | 933d95094567568908d881111781a9928328c047 /pkg/fdnotifier | |
parent | 06102af65ad2d0e5a89c5e7dfe281afd5346ed4f (diff) | |
parent | 83fdb7739e2da5636147bac89d2508be507801dc (diff) |
Merge pull request #653 from xiaobo55x:dev
PiperOrigin-RevId: 262402929
Diffstat (limited to 'pkg/fdnotifier')
-rw-r--r-- | pkg/fdnotifier/BUILD | 5 | ||||
-rw-r--r-- | pkg/fdnotifier/fdnotifier.go | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/pkg/fdnotifier/BUILD b/pkg/fdnotifier/BUILD index d0552c06e..aca2d8a82 100644 --- a/pkg/fdnotifier/BUILD +++ b/pkg/fdnotifier/BUILD @@ -10,5 +10,8 @@ go_library( ], importpath = "gvisor.dev/gvisor/pkg/fdnotifier", visibility = ["//:sandbox"], - deps = ["//pkg/waiter"], + deps = [ + "//pkg/waiter", + "@org_golang_x_sys//unix:go_default_library", + ], ) 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, } |