shithub: mc

Download patch

ref: 997b26b1303f08fd91937a518763e5941d95b1e3
parent: 2b99364b132823f9ab10064270ed267d682f9fe8
author: Ori Bernstein <ori@eigenstate.org>
date: Sat Sep 9 12:54:34 EDT 2017

Fix gettimeofday() on OSX.

	They added an arg. We need to as well.

--- a/lib/sys/sys+osx-x64.myr
+++ b/lib/sys/sys+osx-x64.myr
@@ -840,7 +840,7 @@
 extern const __osx_pipe : (fd : fd[2]# -> int64)
 extern const __osx_getpid	: (-> pid)
 extern const __osx_lseek	: (fd:fd, off:off, whence:whence -> off)
-extern const __osx_gettimeofday	: (tv : timeval#, tz : timezone# -> int)
+extern const __osx_gettimeofday	: (tv : timeval#, tz : timezone#, abstime : uint64# -> int)
 /*
 extern const __osx_ptrace
 extern const __osx_signalstack
@@ -988,7 +988,7 @@
 	-> (syscall(Sysmmap, a(addr), a(len), a(prot), a(flags), a(fd), a(off)) : byte#)}
 
 /* time */
-const gettimeofday = {tv, tz;	-> (__osx_gettimeofday(tv, tz) : int)}
+const gettimeofday = {tv, tz;	-> (__osx_gettimeofday(tv, tz, (0 : uint64#)) : int)}
 const settimeofday = {tv, tz;	-> (syscall(Syssettimeofday, a(tv), a(tz)) : int)}
 
 /* faked  with gettimeofday */