diff options
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r-- | linux-user/syscall.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 6cad6d92f4..52806bb20e 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -3535,7 +3535,7 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3, struct target_stat *target_st; lock_user_struct(target_st, arg2, 0); -#if defined(TARGET_MIPS) +#if defined(TARGET_MIPS) || defined(TARGET_SPARC64) target_st->st_dev = tswap32(st.st_dev); #else target_st->st_dev = tswap16(st.st_dev); @@ -3545,6 +3545,10 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3, target_st->st_mode = tswapl(st.st_mode); /* XXX: check this */ target_st->st_uid = tswap32(st.st_uid); target_st->st_gid = tswap32(st.st_gid); +#elif defined(TARGET_SPARC64) + target_st->st_mode = tswap32(st.st_mode); + target_st->st_uid = tswap32(st.st_uid); + target_st->st_gid = tswap32(st.st_gid); #else target_st->st_mode = tswap16(st.st_mode); target_st->st_uid = tswap16(st.st_uid); @@ -3554,6 +3558,9 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3, /* If this is the same on PPC, then just merge w/ the above ifdef */ target_st->st_nlink = tswapl(st.st_nlink); target_st->st_rdev = tswapl(st.st_rdev); +#elif defined(TARGET_SPARC64) + target_st->st_nlink = tswap32(st.st_nlink); + target_st->st_rdev = tswap32(st.st_rdev); #else target_st->st_nlink = tswap16(st.st_nlink); target_st->st_rdev = tswap16(st.st_rdev); |