summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryan11.meng <yan11.meng@samsung.com>2020-05-11 14:19:57 +0800
committeryan11.meng <yan11.meng@samsung.com>2020-05-11 14:58:20 +0800
commitd8d85e8b61ab8137de55b1fa8a32c1b68fd0e4fb (patch)
tree1f8378ae663cfbf3b6e4b80b6a7844218580496d
parentd0af4815f01745ecd91ac50c0238f6de0eb5db30 (diff)
downloadqemu-arm-static-d8d85e8b61ab8137de55b1fa8a32c1b68fd0e4fb.tar.gz
qemu-arm-static-d8d85e8b61ab8137de55b1fa8a32c1b68fd0e4fb.tar.bz2
qemu-arm-static-d8d85e8b61ab8137de55b1fa8a32c1b68fd0e4fb.zip
"undefined reference to `stime'" Change-Id: I7fac778248574a002fb13c7c4b1bfd84e07bdc0f Signed-off-by: yan11.meng <yan11.meng@samsung.com>
-rw-r--r--linux-user/syscall.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 998ae6a67..c702119ea 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -5459,10 +5459,11 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
#ifdef TARGET_NR_stime /* not on alpha */
case TARGET_NR_stime:
{
- time_t host_time;
- if (get_user_sal(host_time, arg1))
+ struct timespec ts;
+ ts.tv_nsec = 0;
+ if (get_user_sal(ts.tv_sec, arg1))
goto efault;
- ret = get_errno(stime(&host_time));
+ ret = get_errno(clock_settime(CLOCK_REALTIME, &ts));
}
break;
#endif