diff options
author | Ori Bernstein <ori@eigenstate.org> | 2016-07-16 18:27:59 +1200 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2016-07-16 18:27:59 +1200 |
commit | b0556e8d98eb7ab7cdc0826de7cdcfcef935db82 (patch) | |
tree | d03e384c955e23242a9a437307e1b9d7f704f428 /lib/sys/sys+openbsd-x64.myr | |
parent | ddc0ccdd899d29f60b53c069cf4be4d63156ec92 (diff) | |
download | mc-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.myr | 3 |
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 */ |