@@ -968,6 +968,19 @@ print_chmod(const struct syscallname *name,
}
#endif
+#ifdef TARGET_NR_clock_adjtime
+static void
+print_clock_adjtime(const struct syscallname *name,
+ abi_long arg0, abi_long arg1, abi_long arg2,
+ abi_long arg3, abi_long arg4, abi_long arg5)
+{
+ print_syscall_prologue(name);
+ print_raw_param("%d", arg0, 0);
+ print_pointer(arg1, 1);
+ print_syscall_epilogue(name);
+}
+#endif
+
#ifdef TARGET_NR_clone
static void do_print_clone(unsigned int flags, abi_ulong newsp,
abi_ulong parent_tidptr, target_ulong newtls,
@@ -72,6 +72,9 @@
#ifdef TARGET_NR_chroot
{ TARGET_NR_chroot, "chroot" , NULL, NULL, NULL },
#endif
+#ifdef TARGET_NR_clock_adjtime
+{ TARGET_NR_clock_adjtime, "clock_adjtime" , NULL, print_clock_adjtime, NULL },
+#endif
#ifdef TARGET_NR_clock_getres
{ TARGET_NR_clock_getres, "clock_getres" , NULL, NULL, NULL },
#endif
@@ -6579,7 +6579,7 @@ static inline abi_long target_ftruncate64(void *cpu_env, abi_long arg1,
}
#endif
-#ifdef TARGET_NR_adjtimex
+#if defined(TARGET_NR_adjtimex) || defined(TARGET_NR_clock_adjtime)
static inline abi_long target_to_host_timex(struct timex *host_buf,
abi_long target_addr)
{
@@ -9509,6 +9509,23 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
}
break;
#endif
+#ifdef TARGET_NR_clock_adjtime
+ case TARGET_NR_clock_adjtime:
+ {
+ struct timex host_buf;
+
+ if (target_to_host_timex(&host_buf, arg2) != 0) {
+ goto efault;
+ }
+ ret = get_errno(clock_adjtime(arg1, &host_buf));
+ if (!is_error(ret) && arg1) {
+ if (host_to_target_timex(arg2, &host_buf) != 0) {
+ goto efault;
+ }
+ }
+ }
+ break;
+#endif
#ifdef TARGET_NR_create_module
case TARGET_NR_create_module:
#endif