Skip to content

Commit aa175a1

Browse files
committed
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 <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 53dede9 commit aa175a1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/internal/syscall/unix/nonblocking.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
// +build aix dragonfly freebsd linux netbsd openbsd solaris
5+
// +build dragonfly freebsd linux netbsd openbsd
66

77
package unix
88

src/internal/syscall/unix/nonblocking_darwin.go renamed to src/internal/syscall/unix/nonblocking_libc.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
// +build darwin
5+
// +build aix darwin solaris
66

77
package unix
88

@@ -19,6 +19,6 @@ func IsNonblock(fd int) (nonblocking bool, err error) {
1919
return flag&syscall.O_NONBLOCK != 0, nil
2020
}
2121

22-
// Implemented in syscall/syscall_darwin.go.
22+
// Implemented in the syscall package.
2323
//go:linkname fcntl syscall.fcntl
2424
func fcntl(fd int, cmd int, arg int) (int, error)

0 commit comments

Comments
 (0)