Signed-off-by: Richard Henderson <richard.hender...@linaro.org> --- linux-user/syscall-defs.h | 3 +++ linux-user/syscall-time.inc.c | 12 ++++++++++++ linux-user/syscall.c | 9 --------- linux-user/strace.list | 3 --- 4 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/linux-user/syscall-defs.h b/linux-user/syscall-defs.h index 0d8da0c6d6..6ca82af397 100644 --- a/linux-user/syscall-defs.h +++ b/linux-user/syscall-defs.h @@ -152,6 +152,9 @@ SYSCALL_DEF(shmdt, ARG_PTR); #if !defined(SYSCALL_TABLE) || defined(TARGET_NR_shmget) SYSCALL_DEF(shmget, ARG_DEC, ARG_DEC, ARG_HEX); #endif +#ifdef TARGET_NR_stime +SYSCALL_DEF(stime, ARG_PTR); +#endif #ifdef TARGET_NR_time SYSCALL_DEF(time, ARG_PTR); #endif diff --git a/linux-user/syscall-time.inc.c b/linux-user/syscall-time.inc.c index 14fec88e47..d1fb72bde0 100644 --- a/linux-user/syscall-time.inc.c +++ b/linux-user/syscall-time.inc.c @@ -16,6 +16,18 @@ * along with this program; if not, see <http://www.gnu.org/licenses/>. */ +#ifdef TARGET_NR_stime +SYSCALL_IMPL(stime) +{ + time_t host_time; + + if (get_user_sal(host_time, arg1)) { + return -TARGET_EFAULT; + } + return get_errno(stime(&host_time)); +} +#endif + #ifdef TARGET_NR_time SYSCALL_IMPL(time) { diff --git a/linux-user/syscall.c b/linux-user/syscall.c index f3e03f535d..ae56ecbbc7 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -5380,15 +5380,6 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, void *p; switch(num) { -#ifdef TARGET_NR_stime /* not on alpha */ - case TARGET_NR_stime: - { - time_t host_time; - if (get_user_sal(host_time, arg1)) - return -TARGET_EFAULT; - return get_errno(stime(&host_time)); - } -#endif #ifdef TARGET_NR_alarm /* not on alpha */ case TARGET_NR_alarm: return alarm(arg1); diff --git a/linux-user/strace.list b/linux-user/strace.list index 973a4c9209..d0646b9424 100644 --- a/linux-user/strace.list +++ b/linux-user/strace.list @@ -1254,9 +1254,6 @@ #ifdef TARGET_NR_statfs64 { TARGET_NR_statfs64, "statfs64" , NULL, print_statfs64, NULL }, #endif -#ifdef TARGET_NR_stime -{ TARGET_NR_stime, "stime" , NULL, NULL, NULL }, -#endif #ifdef TARGET_NR_streams1 { TARGET_NR_streams1, "streams1" , NULL, NULL, NULL }, #endif -- 2.17.1