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/hook_cloexec.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/internal/poll/hook_cloexec.go') diff --git a/src/internal/poll/hook_cloexec.go b/src/internal/poll/hook_cloexec.go index 5c93bdaf6c..5fd5449bb0 100644 --- a/src/internal/poll/hook_cloexec.go +++ b/src/internal/poll/hook_cloexec.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build dragonfly freebsd linux netbsd openbsd +// +build dragonfly freebsd illumos linux netbsd openbsd package poll -- cgit v1.2.1