mirror of git://sourceware.org/git/glibc.git
linux: Fix fstat64 on alpha and sparc64
The 551101e824
change is incorrect for
alpha and sparc, since __NR_stat is defined by both kABI. Use
__NR_newfstat to check whether to fallback to __NR_fstat64 (similar
to what fstatat64 does).
Checked on sparc64-linux-gnu.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
parent
08ddd26814
commit
061eaf0244
|
@ -30,8 +30,11 @@ __fstat64_time64 (int fd, struct __stat64_t64 *buf)
|
||||||
{
|
{
|
||||||
#if !FSTATAT_USE_STATX
|
#if !FSTATAT_USE_STATX
|
||||||
# if XSTAT_IS_XSTAT64
|
# if XSTAT_IS_XSTAT64
|
||||||
# ifdef __NR_fstat
|
/* The __NR_stat macro is defined for all ABIs that also define
|
||||||
/* 64-bit kABI, e.g. aarch64, powerpc64*, s390x, riscv64, and
|
XSTAT_IS_STAT64, so to correctly identify alpha and sparc check
|
||||||
|
__NR_newfstatat (similar to what fstatat64 does). */
|
||||||
|
# ifdef __NR_newfstatat
|
||||||
|
/* 64-bit kABI, e.g. aarch64, ia64, powerpc64*, s390x, riscv64, and
|
||||||
x86_64. */
|
x86_64. */
|
||||||
return INLINE_SYSCALL_CALL (fstat, fd, buf);
|
return INLINE_SYSCALL_CALL (fstat, fd, buf);
|
||||||
# elif defined __NR_fstat64
|
# elif defined __NR_fstat64
|
||||||
|
|
Loading…
Reference in New Issue