From: yan11.meng Date: Mon, 11 May 2020 06:19:57 +0000 (+0800) Subject: fix build error for ubuntu20.04 X-Git-Tag: submit/trunk/20200612.180310^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d8d85e8b61ab8137de55b1fa8a32c1b68fd0e4fb;p=tools%2Fqemu-arm-static.git fix build error for ubuntu20.04 "undefined reference to `stime'" Change-Id: I7fac778248574a002fb13c7c4b1bfd84e07bdc0f Signed-off-by: yan11.meng --- 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