public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc] linux: Fix fstat64 on alpha and sparc64 Date: Fri, 12 Jan 2024 19:35:08 +0000 (GMT) [thread overview] Message-ID: <20240112193508.EEB853858D28@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=061eaf024470627d835d347860d5f8c59b454d08 commit 061eaf024470627d835d347860d5f8c59b454d08 Author: Adhemerval Zanella <adhemerval.zanella@linaro.org> Date: Tue Jan 2 11:31:52 2024 -0300 linux: Fix fstat64 on alpha and sparc64 The 551101e8240b7514fc646d1722f8b79c90362b8f 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> Diff: --- sysdeps/unix/sysv/linux/fstat64.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/fstat64.c b/sysdeps/unix/sysv/linux/fstat64.c index f631ab22f4..cc9f695df9 100644 --- a/sysdeps/unix/sysv/linux/fstat64.c +++ b/sysdeps/unix/sysv/linux/fstat64.c @@ -30,8 +30,11 @@ __fstat64_time64 (int fd, struct __stat64_t64 *buf) { #if !FSTATAT_USE_STATX # if XSTAT_IS_XSTAT64 -# ifdef __NR_fstat - /* 64-bit kABI, e.g. aarch64, powerpc64*, s390x, riscv64, and + /* The __NR_stat macro is defined for all ABIs that also define + 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. */ return INLINE_SYSCALL_CALL (fstat, fd, buf); # elif defined __NR_fstat64
reply other threads:[~2024-01-12 19:35 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20240112193508.EEB853858D28@sourceware.org \ --to=azanella@sourceware.org \ --cc=glibc-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).