Patch from Debian patchset in the attachment.
--- linux-user/syscall.c.orig   2006-11-05 07:07:19.000000000 +0200
+++ linux-user/syscall.c        2006-11-05 07:07:25.000000000 +0200
@@ -3972,6 +3982,22 @@ long do_syscall(void *cpu_env, int num, 
     case TARGET_NR_getdomainname:
         goto unimplemented_nowarn;
 #endif
+#ifdef TARGET_NR_clock_gettime
+    case TARGET_NR_clock_gettime:
+    {
+        struct target_timespec* ttp = (struct target_timespec*)arg2;
+        struct timespec htp;
+        if(ttp) {
+          htp.tv_sec = tswapl(ttp->tv_sec);
+          htp.tv_nsec = tswapl(ttp->tv_nsec);
+          ret = get_errno(clock_gettime((clockid_t)arg1, &htp));
+          ttp->tv_sec = tswapl(htp.tv_sec);
+          ttp->tv_nsec = tswapl(htp.tv_nsec);
+        } else
+          ret = get_errno(clock_gettime((clockid_t)arg1, NULL));
+        break;
+    }
+#endif
     default:
     unimplemented:
         gemu_log("qemu: Unsupported syscall: %d\n", num);
Index: Makefile.target
===================================================================
--- Makefile.target.orig        2006-11-05 07:06:52.000000000 +0200
+++ Makefile.target     2006-11-05 07:07:25.000000000 +0200
@@ -166,7 +166,7 @@ endif
 #########################################################
 
 CPPFLAGS+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-LIBS+=-lm
+LIBS+=-lm -lrt
 ifndef CONFIG_USER_ONLY
 LIBS+=-lz
 endif

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Reply via email to