shithub: mc

Download patch

ref: f892d705f7ea448c9d36c7d1f1f41ff26ce86ede
parent: 302d076106a5731bbf6f7a05f5043dc978b18a0f
author: Ori Bernstein <ori@eigenstate.org>
date: Sun Jan 4 08:58:40 EST 2015

Fix compile issue: type mismatch.

--- a/libstd/syswrap+plan9.myr
+++ b/libstd/syswrap+plan9.myr
@@ -116,7 +116,7 @@
 	if sys.stat(path, buf[:]) < Stringsoff
 		-> `None
 	;;
-	-> `Some getle64(buf[Lengthoff:Lengthoff + 8])
+	-> `Some (getle32(buf[Mtimeoff:Mtimeoff + 8]) castto(time))
 }
 
 const fsize = {path
@@ -125,7 +125,7 @@
 	if sys.stat(path, buf[:]) < Stringsoff
 		-> `None
 	;;
-	-> `Some getle64(buf[Lengthoff:Lengthoff + 8])
+	-> `Some (getle64(buf[Lengthoff:Lengthoff + 8]) castto(off))
 }
 
 const getsysinfo = {si
@@ -217,9 +217,11 @@
 	-> errbuf[:i]
 }
 
+/* FIXME: will be needed when we resize stat bufs when statting.
 const statsz = {buf
 	-> (buf[0] castto(int64)) | ((buf[1] << 8) castto(int64))
 }
+*/
 
 const getle32 = {buf
 	-> (buf[0] castto(int32)) \