From 9cec50f50c29f5ef7264bf06ee7ac0991b4b36d6 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Fri, 16 Oct 2020 19:35:09 +0200 Subject: internal/poll, net, syscall: use accept4 on illumos Illumos supports the accept4 syscall, use it in internal/poll.accept like on other platforms. Add Accept4 to package syscall despite the package being frozen. The other option would have been to add this to internal/syscall/unix, but adding it to syscall avoids duplicating a lot of code in internal/poll and net/internal/socktest. Also, all other platforms supporting the accept4 syscall already export Accept4. Follow CL 97196, CL 40895 and CL 94295 Change-Id: I13b32f0163a683840c02b16722730d9dfdb98f56 Reviewed-on: https://go-review.googlesource.com/c/go/+/256101 Trust: Tobias Klauser Run-TryBot: Tobias Klauser TryBot-Result: Go Bot Reviewed-by: Brad Fitzpatrick --- src/internal/poll/sys_cloexec.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/internal/poll/sys_cloexec.go') diff --git a/src/internal/poll/sys_cloexec.go b/src/internal/poll/sys_cloexec.go index 7b87f136df..4b3c642173 100644 --- a/src/internal/poll/sys_cloexec.go +++ b/src/internal/poll/sys_cloexec.go @@ -5,7 +5,7 @@ // This file implements sysSocket and accept for platforms that do not // provide a fast path for setting SetNonblock and CloseOnExec. -// +build aix darwin js,wasm solaris +// +build aix darwin js,wasm solaris,!illumos package poll -- cgit v1.2.1