summaryrefslogtreecommitdiff
path: root/libstd/sys+plan9-x64.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-01-04 13:56:08 -0800
committerOri Bernstein <ori@eigenstate.org>2015-01-04 13:56:08 -0800
commitb91f9a20e3c35f4328c77130fc30537f23e794d3 (patch)
tree74fbb3b28cf3566f3b5e8ef08856a26575b9cf22 /libstd/sys+plan9-x64.myr
parent06fc25275fb97aec1e46467138330b202a6e3313 (diff)
downloadmc-b91f9a20e3c35f4328c77130fc30537f23e794d3.tar.gz
Fix broken stat.
We were missing a return statement.
Diffstat (limited to 'libstd/sys+plan9-x64.myr')
-rw-r--r--libstd/sys+plan9-x64.myr4
1 files changed, 3 insertions, 1 deletions
diff --git a/libstd/sys+plan9-x64.myr b/libstd/sys+plan9-x64.myr
index fefaaa6..ed80521 100644
--- a/libstd/sys+plan9-x64.myr
+++ b/libstd/sys+plan9-x64.myr
@@ -158,6 +158,8 @@ pkg sys =
const brk_ : (endp : byte# -> int64)
const nsec : (-> uint64)
+ extern const alloca : (sz : size -> byte#)
+
extern var tosptr : tos#
extern var curbrk : byte#
;;
@@ -202,7 +204,7 @@ const segfree = {va, len; -> syscall(Syssegfree, a(va), a(len))}
const segflush = {va, len; -> syscall(Syssegfree, a(va), a(len))}
const unmount = {name, old; -> syscall(Sysunmount, cstring(name), cstring(old))}
const errstr = {buf; -> syscall(Syserrstr, p(buf), a(buf.len))}
-const stat = {name, edir; -> syscall(Sysstat, cstring(name), p(edir), a(edir.len))}
+const stat = {name, edir; -> syscall(Sysstat, cstring(name), p(edir), a(edir.len)) & 0xfffffff}
const fstat = {fd, edir; -> syscall(Sysstat, a(fd), p(edir), a(edir.len))}
const wstat = {name, edir; -> syscall(Syswstat, cstring(name), p(edir), a(edir.len))}
const fwstat = {fd, edir; -> syscall(Sysfwstat, a(fd), p(edir), a(edir.len))}