ref: b0556e8d98eb7ab7cdc0826de7cdcfcef935db82
parent: ddc0ccdd899d29f60b53c069cf4be4d63156ec92
author: Ori Bernstein <ori@eigenstate.org>
date: Sat Jul 16 14:27:59 EDT 2016
Fix mmap offset on OpenBSD (see http://marc.info/?l=openbsd-tech&m=146793252011083&w=2)
--- a/lib/sys/sys+openbsd-x64.myr
+++ b/lib/sys/sys+openbsd-x64.myr
@@ -633,7 +633,8 @@
/* 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 */