Commit aa175a19 authored by Tobias Klauser's avatar Tobias Klauser Committed by Tobias Klauser

internal/syscall/unix: use libc based fcntl for IsNonblock on aix and solaris

On aix and solaris (like on darwin) use libc fcntl to implement
IsNonblock instead of Syscall(SYS_FCNTL, ...) which isn't supported.

Change-Id: I989b02aa0c90b7e2dae025572867dda277fef8be
Reviewed-on: https://go-review.googlesource.com/c/go/+/212600
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent 53dede93
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
// +build aix dragonfly freebsd linux netbsd openbsd solaris // +build dragonfly freebsd linux netbsd openbsd
package unix package unix
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
// +build darwin // +build aix darwin solaris
package unix package unix
...@@ -19,6 +19,6 @@ func IsNonblock(fd int) (nonblocking bool, err error) { ...@@ -19,6 +19,6 @@ func IsNonblock(fd int) (nonblocking bool, err error) {
return flag&syscall.O_NONBLOCK != 0, nil return flag&syscall.O_NONBLOCK != 0, nil
} }
// Implemented in syscall/syscall_darwin.go. // Implemented in the syscall package.
//go:linkname fcntl syscall.fcntl //go:linkname fcntl syscall.fcntl
func fcntl(fd int, cmd int, arg int) (int, error) func fcntl(fd int, cmd int, arg int) (int, error)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment