diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-11-24 12:57:57 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-11-25 09:28:27 -0300 |
commit | c3b023a7822185c9176cfb96eeca4ada3d662c4b (patch) | |
tree | a8e126ff7ae6d7932f301ce5c8f99dd7fac6b9f3 /sysdeps | |
parent | c52ef24829f95a819965214eeae28e3289a91a61 (diff) | |
download | glibc-c3b023a7822185c9176cfb96eeca4ada3d662c4b.tar.gz glibc-c3b023a7822185c9176cfb96eeca4ada3d662c4b.tar.xz glibc-c3b023a7822185c9176cfb96eeca4ada3d662c4b.zip |
linux: Only build fstatat fallback if required
For 32-bit architecture with __ASSUME_STATX there is no need to build fstatat64_time64_stat. Checked on i686-linux-gnu.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/unix/sysv/linux/fstatat64.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/sysdeps/unix/sysv/linux/fstatat64.c b/sysdeps/unix/sysv/linux/fstatat64.c index f968e4ef05..50ae5ad748 100644 --- a/sysdeps/unix/sysv/linux/fstatat64.c +++ b/sysdeps/unix/sysv/linux/fstatat64.c @@ -74,6 +74,17 @@ fstatat64_time64_statx (int fd, const char *file, struct __stat64_t64 *buf, return r; } +#if (__WORDSIZE == 32 \ + && (!defined __SYSCALL_WORDSIZE || __SYSCALL_WORDSIZE == 32)) \ + || defined STAT_HAS_TIME32 +# define FSTATAT_USE_STATX 1 +#else +# define FSTATAT_USE_STATX 0 +#endif + +/* Only statx supports 64-bit timestamps for 32-bit architectures with + __ASSUME_STATX, so there is no point in building the fallback. */ +#if !FSTATAT_USE_STATX || (FSTATAT_USE_STATX && !defined __ASSUME_STATX) static inline int fstatat64_time64_stat (int fd, const char *file, struct __stat64_t64 *buf, int flag) @@ -134,13 +145,6 @@ fstatat64_time64_stat (int fd, const char *file, struct __stat64_t64 *buf, return r; } - -#if (__WORDSIZE == 32 \ - && (!defined __SYSCALL_WORDSIZE || __SYSCALL_WORDSIZE == 32)) \ - || defined STAT_HAS_TIME32 -# define FSTATAT_USE_STATX 1 -#else -# define FSTATAT_USE_STATX 0 #endif int |