diff options
Diffstat (limited to 'src/runtime/sys_openbsd_386.s')
-rw-r--r-- | src/runtime/sys_openbsd_386.s | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/runtime/sys_openbsd_386.s b/src/runtime/sys_openbsd_386.s index 963678a2c3..3e5dbc2b0a 100644 --- a/src/runtime/sys_openbsd_386.s +++ b/src/runtime/sys_openbsd_386.s @@ -542,6 +542,12 @@ TEXT runtime·fcntl_trampoline(SB),NOSPLIT,$0 MOVL CX, 8(SP) // arg 3 - arg MOVL $0, 12(SP) // vararg CALL libc_fcntl(SB) + CMPL AX, $-1 + JNE noerr + CALL libc_errno(SB) + MOVL (AX), AX + NEGL AX // caller expects negative errno +noerr: MOVL BP, SP POPL BP RET |