aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sys_openbsd_amd64.s
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/sys_openbsd_amd64.s')
-rw-r--r--src/runtime/sys_openbsd_amd64.s4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/runtime/sys_openbsd_amd64.s b/src/runtime/sys_openbsd_amd64.s
index 38ac38d9bf..227e81869c 100644
--- a/src/runtime/sys_openbsd_amd64.s
+++ b/src/runtime/sys_openbsd_amd64.s
@@ -305,7 +305,9 @@ TEXT runtime·madvise(SB),NOSPLIT,$0
MOVL flags+16(FP), DX // arg 3 - behav
MOVQ $75, AX // sys_madvise
SYSCALL
- // ignore failure - maybe pages are locked
+ JCC 2(PC)
+ MOVL $-1, AX
+ MOVL AX, ret+24(FP)
RET
TEXT runtime·sigaltstack(SB),NOSPLIT,$-8