@@ -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
@@ -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)
{
@@ -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);
@@ -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
Signed-off-by: Richard Henderson <richard.henderson@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(-)