diff options
Diffstat (limited to 'src/runtime/sys_openbsd_amd64.s')
-rw-r--r-- | src/runtime/sys_openbsd_amd64.s | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/runtime/sys_openbsd_amd64.s b/src/runtime/sys_openbsd_amd64.s index 2c026c8d0db..35a57c026b6 100644 --- a/src/runtime/sys_openbsd_amd64.s +++ b/src/runtime/sys_openbsd_amd64.s @@ -393,6 +393,12 @@ TEXT runtime·fcntl_trampoline(SB),NOSPLIT,$0 MOVL 0(DI), DI // arg 1 fd XORL AX, AX // vararg: say "no float args" CALL libc_fcntl(SB) + TESTL AX, AX + JGE noerr + CALL libc_errno(SB) + MOVL (AX), AX + NEGL AX // caller expects negative errno value +noerr: POPQ BP RET |