diff options
Diffstat (limited to 'src/runtime/sys_darwin_amd64.s')
-rw-r--r-- | src/runtime/sys_darwin_amd64.s | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/runtime/sys_darwin_amd64.s b/src/runtime/sys_darwin_amd64.s index ba81fcc35c..3ba673c5ec 100644 --- a/src/runtime/sys_darwin_amd64.s +++ b/src/runtime/sys_darwin_amd64.s @@ -437,6 +437,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 + JGT noerr + CALL libc_error(SB) + MOVL (AX), AX + NEGL AX // caller expects negative errno value +noerr: POPQ BP RET |