dune: gettimeofday fix
authorZach Zimmerman <zpzim@google.com>
Fri, 30 Jun 2017 22:05:58 +0000 (15:05 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Sat, 1 Jul 2017 21:22:30 +0000 (17:22 -0400)
Change-Id: I5c14e66d7055c05b4838c8e3b1b7815fef8350bc
Signed-off-by: Zach Zimmerman <zpzim@google.com>
[minor formatting]
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
user/vmm/linuxemu.c

index a70bfcd..bd217e8 100644 (file)
@@ -13,6 +13,7 @@
 #include <errno.h>
 #include <sys/syscall.h>
 #include <vmm/linux_syscalls.h>
+#include <sys/time.h>
 
 /* TODO: have an array which classifies syscall args
  * and "special" system calls (ones with weird return
@@ -40,7 +41,8 @@ linuxemu(struct guest_thread *gth, struct vm_trapframe *tf)
                //tf->tf_rax = -ENOSYS;
                break;
        case DUNE_SYS_GETTIMEOFDAY:
-               tf->tf_rax = 0;
+               tf->tf_rax = gettimeofday((struct timeval*)tf->tf_rdi,
+                                         (struct timezone*)tf->tf_rsi);
                ret = true;
                break;
        case DUNE_SYS_GETTID: