diff options
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r-- | linux-user/syscall.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 51cc049e06..0d6c764502 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -6409,6 +6409,11 @@ static inline abi_long host_to_target_stat64(void *cpu_env, __put_user(host_st->st_atime, &target_st->target_st_atime); __put_user(host_st->st_mtime, &target_st->target_st_mtime); __put_user(host_st->st_ctime, &target_st->target_st_ctime); +#if _POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700 + __put_user(host_st->st_atim.tv_nsec, &target_st->target_st_atime_nsec); + __put_user(host_st->st_mtim.tv_nsec, &target_st->target_st_mtime_nsec); + __put_user(host_st->st_ctim.tv_nsec, &target_st->target_st_ctime_nsec); +#endif unlock_user_struct(target_st, target_addr, 1); } else #endif @@ -6439,6 +6444,11 @@ static inline abi_long host_to_target_stat64(void *cpu_env, __put_user(host_st->st_atime, &target_st->target_st_atime); __put_user(host_st->st_mtime, &target_st->target_st_mtime); __put_user(host_st->st_ctime, &target_st->target_st_ctime); +#if _POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700 + __put_user(host_st->st_atim.tv_nsec, &target_st->target_st_atime_nsec); + __put_user(host_st->st_mtim.tv_nsec, &target_st->target_st_mtime_nsec); + __put_user(host_st->st_ctim.tv_nsec, &target_st->target_st_ctime_nsec); +#endif unlock_user_struct(target_st, target_addr, 1); } @@ -8892,6 +8902,15 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, __put_user(st.st_atime, &target_st->target_st_atime); __put_user(st.st_mtime, &target_st->target_st_mtime); __put_user(st.st_ctime, &target_st->target_st_ctime); +#if (_POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700) && \ + defined(TARGET_STAT_HAVE_NSEC) + __put_user(st.st_atim.tv_nsec, + &target_st->target_st_atime_nsec); + __put_user(st.st_mtim.tv_nsec, + &target_st->target_st_mtime_nsec); + __put_user(st.st_ctim.tv_nsec, + &target_st->target_st_ctime_nsec); +#endif unlock_user_struct(target_st, arg2, 1); } } |