summaryrefslogtreecommitdiff
path: root/lib/sys/sys+openbsd-x64.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-07-16 18:27:59 +1200
committerOri Bernstein <ori@eigenstate.org>2016-07-16 18:27:59 +1200
commitb0556e8d98eb7ab7cdc0826de7cdcfcef935db82 (patch)
treed03e384c955e23242a9a437307e1b9d7f704f428 /lib/sys/sys+openbsd-x64.myr
parentddc0ccdd899d29f60b53c069cf4be4d63156ec92 (diff)
downloadmc-b0556e8d98eb7ab7cdc0826de7cdcfcef935db82.tar.gz
Fix mmap offset on OpenBSD (see http://marc.info/?l=openbsd-tech&m=146793252011083&w=2)
Diffstat (limited to 'lib/sys/sys+openbsd-x64.myr')
-rw-r--r--lib/sys/sys+openbsd-x64.myr3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sys/sys+openbsd-x64.myr b/lib/sys/sys+openbsd-x64.myr
index 6c09dd8..0fe96d5 100644
--- a/lib/sys/sys+openbsd-x64.myr
+++ b/lib/sys/sys+openbsd-x64.myr
@@ -633,7 +633,8 @@ const getsockopt = {sock, lev, opt, val, len; -> (syscall(Syssetsockopt, a(sock)
/* memory management */
const munmap = {addr, len; -> syscall(Sysmunmap, a(addr), a(len))}
const mmap = {addr, len, prot, flags, fd, off;
- -> (syscall(Sysmmap, a(addr), a(len), a(prot), a(flags), a(fd), a(off)) : byte#)
+ /* the actual syscall has padding on the offset arg */
+ -> (syscall(Sysmmap, a(addr), a(len), a(prot), a(flags), a(fd), a(0), a(off)) : byte#)
}
/* time */