aboutsummaryrefslogtreecommitdiff
path: root/rwcancel/poll_linux.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-09-27 14:18:38 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2021-09-27 14:19:15 -0600
commitbb745b2ea3264bb764cac77c4fa8e69cf9b2a975 (patch)
tree9ead346dee4c446f99dc79f954aef40c2ec3682b /rwcancel/poll_linux.go
parentfcc601dbf0f6b626ec1d47a880cbe64f9c8fe385 (diff)
downloadwireguard-go-bb745b2ea3264bb764cac77c4fa8e69cf9b2a975.tar.gz
wireguard-go-bb745b2ea3264bb764cac77c4fa8e69cf9b2a975.zip
rwcancel: use unix.Poll again but bump x/sys so it uses ppoll under the hood
This reverts commit fcc601dbf0f6b626ec1d47a880cbe64f9c8fe385 but then bumps go.mod. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'rwcancel/poll_linux.go')
-rw-r--r--rwcancel/poll_linux.go17
1 files changed, 0 insertions, 17 deletions
diff --git a/rwcancel/poll_linux.go b/rwcancel/poll_linux.go
deleted file mode 100644
index d9938c5..0000000
--- a/rwcancel/poll_linux.go
+++ /dev/null
@@ -1,17 +0,0 @@
-/* SPDX-License-Identifier: MIT
- *
- * Copyright (C) 2017-2021 WireGuard LLC. All Rights Reserved.
- */
-
-package rwcancel
-
-import "golang.org/x/sys/unix"
-
-func poll(fds []unix.PollFd, timeout int) (n int, err error) {
- var ts *unix.Timespec
- if timeout >= 0 {
- ts = new(unix.Timespec)
- *ts = unix.NsecToTimespec(int64(timeout) * 1e6)
- }
- return unix.Ppoll(fds, ts, nil)
-}