aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/statx_cp.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-03-19 09:51:29 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-03-29 10:22:13 -0300
commit5b980d4809913088729982865188b754939bcd39 (patch)
tree4ffb91add912c57b4dbf56a8c9867c6702b9012b /sysdeps/unix/sysv/linux/statx_cp.c
parent1fbffbda365ae8582981dfb284c83903931dd312 (diff)
downloadglibc-5b980d4809913088729982865188b754939bcd39.zip
glibc-5b980d4809913088729982865188b754939bcd39.tar.gz
glibc-5b980d4809913088729982865188b754939bcd39.tar.bz2
linux: Use statx for MIPSn64
MIPSn64 kernel ABI for legacy stat uses unsigned 32 bit for second timestamp, which limits the maximum value to y2106. This patch make mips64 use statx as for 32-bit architectures. Thie __cp_stat64_t64_statx is open coded, its usage is solely on fstatat64 and it avoid the need to redefine the name for mips64 (which will call __cp_stat64_statx since its does not use __stat64_t64 internally).
Diffstat (limited to 'sysdeps/unix/sysv/linux/statx_cp.c')
-rw-r--r--sysdeps/unix/sysv/linux/statx_cp.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/sysdeps/unix/sysv/linux/statx_cp.c b/sysdeps/unix/sysv/linux/statx_cp.c
index 5306870..73405a9 100644
--- a/sysdeps/unix/sysv/linux/statx_cp.c
+++ b/sysdeps/unix/sysv/linux/statx_cp.c
@@ -48,32 +48,3 @@ __cp_stat64_statx (struct stat64 *to, struct statx *from)
}
#endif
-#if (__WORDSIZE == 32 \
- && (!defined __SYSCALL_WORDSIZE || __SYSCALL_WORDSIZE == 32))
-void
-__cp_stat64_t64_statx (struct __stat64_t64 *to, const struct statx *from)
-{
- /* Clear both pad and reserved fields. */
- memset (to, 0, sizeof (*to));
-
- to->st_dev = ((from->stx_dev_minor & 0xff) | (from->stx_dev_major << 8)
- | ((from->stx_dev_minor & ~0xff) << 12));
- to->st_ino = from->stx_ino;
- to->st_mode = from->stx_mode;
- to->st_nlink = from->stx_nlink;
- to->st_uid = from->stx_uid;
- to->st_gid = from->stx_gid;
- to->st_rdev = ((from->stx_rdev_minor & 0xff) | (from->stx_rdev_major << 8)
- | ((from->stx_rdev_minor & ~0xff) << 12));
- to->st_size = from->stx_size;
- to->st_blksize = from->stx_blksize;
- to->st_blocks = from->stx_blocks;
-
- to->st_atime = from->stx_atime.tv_sec;
- to->st_atim.tv_nsec = from->stx_atime.tv_nsec;
- to->st_mtime = from->stx_mtime.tv_sec;
- to->st_mtim.tv_nsec = from->stx_mtime.tv_nsec;
- to->st_ctime = from->stx_ctime.tv_sec;
- to->st_ctim.tv_nsec = from->stx_ctime.tv_nsec;
-}
-#endif