[PATCH] Rename STAT_HAS_TIME32 to KERNEL_STAT64_HAS_TIME32
YunQiang Su
yunqiang.su@cipunited.com
Fri Nov 4 01:54:28 GMT 2022
The macro name STAT_HAS_TIME32 is not so clear.
This macro is used for some arch like MIPSn64.
The kernel_stat/kernel_stat64 of it has a 32bit unsigned time value.
Thus that has y2106 problem.
So we should statx to solve this problem.
---
sysdeps/unix/sysv/linux/fstatat64.c | 2 +-
sysdeps/unix/sysv/linux/mips/kernel_stat.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sysdeps/unix/sysv/linux/fstatat64.c b/sysdeps/unix/sysv/linux/fstatat64.c
index 8b1a1a290d..532b9beb67 100644
--- a/sysdeps/unix/sysv/linux/fstatat64.c
+++ b/sysdeps/unix/sysv/linux/fstatat64.c
@@ -42,7 +42,7 @@ _Static_assert (sizeof (__blkcnt_t) == sizeof (__blkcnt64_t),
#if (__WORDSIZE == 32 \
&& (!defined __SYSCALL_WORDSIZE || __SYSCALL_WORDSIZE == 32)) \
- || defined STAT_HAS_TIME32 \
+ || defined KERNEL_STAT64_HAS_TIME32 \
|| (!defined __NR_newfstatat && !defined __NR_fstatat64)
# define FSTATAT_USE_STATX 1
diff --git a/sysdeps/unix/sysv/linux/mips/kernel_stat.h b/sysdeps/unix/sysv/linux/mips/kernel_stat.h
index 19524f7ea4..044adfb8df 100644
--- a/sysdeps/unix/sysv/linux/mips/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/mips/kernel_stat.h
@@ -69,7 +69,7 @@ struct kernel_stat
#endif
/* MIPS64 has unsigned 32 bit timestamps fields, so use statx as well. */
#if _MIPS_SIM == _ABI64
-# define STAT_HAS_TIME32
+# define KERNEL_STAT64_HAS_TIME32
#endif
#endif
--
2.30.2
More information about the Libc-alpha
mailing list