aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2018-04-01 13:13:49 -0700
committerMax Filippov <jcmvbkbc@gmail.com>2018-04-01 14:23:17 -0700
commit12e3340c23972d7de6c2e306bafecd50abcbea1c (patch)
tree6922ab0518c5892f2fc57386fd5bdbd32745fa6f /linux-user
parentb9f9908e2ddd167eb88ce3457953a30f18d2a7aa (diff)
linux-user: implement clock_settime
This fixes glibc testsuite test rt/tst-clock2. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/syscall.c12
1 files changed, 12 insertions, 0 deletions
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:
{