From fcc601dbf0f6b626ec1d47a880cbe64f9c8fe385 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 26 Sep 2021 17:15:58 -0600 Subject: rwcancel: use ppoll on Linux for Android This is a temporary measure while we wait for https://go-review.googlesource.com/c/sys/+/352310 to land. Signed-off-by: Jason A. Donenfeld --- rwcancel/poll_unix.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 rwcancel/poll_unix.go (limited to 'rwcancel/poll_unix.go') diff --git a/rwcancel/poll_unix.go b/rwcancel/poll_unix.go new file mode 100644 index 0000000..37e9686 --- /dev/null +++ b/rwcancel/poll_unix.go @@ -0,0 +1,15 @@ +//go:build !windows && !linux +// +build !windows,!linux + +/* 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) { + return unix.Poll(fds, timeout) +} -- cgit v1.2.3