From: Max Filippov Date: Sun, 1 Apr 2018 20:13:49 +0000 (-0700) Subject: linux-user: implement clock_settime X-Git-Tag: qemu-xen-4.12.0-rc1~331^2~1 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=12e3340c23972d7de6c2e306bafecd50abcbea1c;p=qemu-xen.git linux-user: implement clock_settime This fixes glibc testsuite test rt/tst-clock2. Signed-off-by: Max Filippov --- diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 52e2f9c164..924fd68efc 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -11878,6 +11878,18 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, goto unimplemented_nowarn; #endif +#ifdef TARGET_NR_clock_settime + case TARGET_NR_clock_settime: + { + struct timespec ts; + + ret = target_to_host_timespec(&ts, arg2); + if (!is_error(ret)) { + ret = get_errno(clock_settime(arg1, &ts)); + } + break; + } +#endif #ifdef TARGET_NR_clock_gettime case TARGET_NR_clock_gettime: {