diff options
author | WANG Xuerui <git@xen0n.name> | 2022-06-01 10:12:28 +0800 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-06-01 12:29:01 -0300 |
commit | e6547d635b991651600fab31f788ed5facd77610 (patch) | |
tree | 9fdc1f99f6ab029119d78dccd99552b4340a8967 /sysdeps | |
parent | de3501d60fac6d194954e0ccc7bd297f53442b3e (diff) | |
download | glibc-e6547d635b991651600fab31f788ed5facd77610.zip glibc-e6547d635b991651600fab31f788ed5facd77610.tar.gz glibc-e6547d635b991651600fab31f788ed5facd77610.tar.bz2 |
linux: use statx for fstat if neither newfstatat nor fstatat64 is present
LoongArch is going to be the first architecture supported by Linux that
has neither fstat* nor newfstatat [1], instead exclusively relying on
statx. So in fstatat64's implementation, we need to also enable statx
usage if neither fstatat64 nor newfstatat is present, to prepare for
this new case of kernel ABI.
[1]: https://lore.kernel.org/all/20220518092619.1269111-1-chenhuacai@loongson.cn/
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/unix/sysv/linux/fstatat64.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/fstatat64.c b/sysdeps/unix/sysv/linux/fstatat64.c index 2ab9143..8b1a1a2 100644 --- a/sysdeps/unix/sysv/linux/fstatat64.c +++ b/sysdeps/unix/sysv/linux/fstatat64.c @@ -42,7 +42,8 @@ _Static_assert (sizeof (__blkcnt_t) == sizeof (__blkcnt64_t), #if (__WORDSIZE == 32 \ && (!defined __SYSCALL_WORDSIZE || __SYSCALL_WORDSIZE == 32)) \ - || defined STAT_HAS_TIME32 + || defined STAT_HAS_TIME32 \ + || (!defined __NR_newfstatat && !defined __NR_fstatat64) # define FSTATAT_USE_STATX 1 static inline int |