aboutsummaryrefslogtreecommitdiff
path: root/src/internal
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2020-10-16 19:35:09 +0200
committerTobias Klauser <tobias.klauser@gmail.com>2020-10-16 19:53:34 +0000
commit9cec50f50c29f5ef7264bf06ee7ac0991b4b36d6 (patch)
treebd7c698ab7341041dfee1bbb43f1be7473c1ca39 /src/internal
parent41162be44a099803a870f9b6c147050594598d63 (diff)
downloadgo-9cec50f50c29f5ef7264bf06ee7ac0991b4b36d6.tar.gz
go-9cec50f50c29f5ef7264bf06ee7ac0991b4b36d6.zip
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 <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/internal')
-rw-r--r--src/internal/poll/hook_cloexec.go2
-rw-r--r--src/internal/poll/sock_cloexec.go2
-rw-r--r--src/internal/poll/sys_cloexec.go2
3 files changed, 3 insertions, 3 deletions
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
diff --git a/src/internal/poll/sock_cloexec.go b/src/internal/poll/sock_cloexec.go
index 691cb8e36f..ff7982ca9e 100644
--- a/src/internal/poll/sock_cloexec.go
+++ b/src/internal/poll/sock_cloexec.go
@@ -5,7 +5,7 @@
// This file implements sysSocket and accept for platforms that
// provide a fast path for setting SetNonblock and CloseOnExec.
-// +build dragonfly freebsd linux netbsd openbsd
+// +build dragonfly freebsd illumos linux netbsd openbsd
package poll
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