aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/os_aix.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/os_aix.go')
-rw-r--r--src/runtime/os_aix.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/runtime/os_aix.go b/src/runtime/os_aix.go
index 104c397e8c0..66b4d94cf20 100644
--- a/src/runtime/os_aix.go
+++ b/src/runtime/os_aix.go
@@ -362,7 +362,10 @@ func walltime() (sec int64, nsec int32) {
//go:nosplit
func fcntl(fd, cmd, arg int32) int32 {
- r, _ := syscall3(&libc_fcntl, uintptr(fd), uintptr(cmd), uintptr(arg))
+ r, errno := syscall3(&libc_fcntl, uintptr(fd), uintptr(cmd), uintptr(arg))
+ if int32(r) < 0 {
+ return -int32(errno)
+ }
return int32(r)
}