glibc: add __f_unused to statvfs64 on riscv32 - #5518
Open
Yasser-Ameur wants to merge 1 commit into
Open
Conversation
tgross35
requested changes
Sep 8, 2026
Collaborator
|
Reminder, once the PR becomes ready for a review, use |
Yasser-Ameur
marked this pull request as ready for review
September 8, 2026 23:48
glibc gates `statvfs` and `statvfs64` on the same macro, and riscv32 satisfies it: `__WORDSIZE` is 32 there and nothing defines `__SYSCALL_WORDSIZE`. Only `statvfs` carried the field, so every `statvfs64` field after `f_fsid` sat four bytes off. This was the FIXME left in rust-lang#5434. https://github.com/sailfishos-mirror/glibc/blob/92861d93cdad13834f4d8f39504b550a80ad8200/sysdeps/unix/sysv/linux/bits/statvfs.h#L24-L27
Yasser-Ameur
force-pushed
the
fix/statvfs64-f-unused-riscv32
branch
from
September 9, 2026 00:06
30b0295 to
ff2c5ec
Compare
Collaborator
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
statvfs64is missing__f_unusedon riscv32, so every field afterf_fsidsits four bytes off.
glibc gates both structs on the same macro and riscv32 satisfies it:
__WORDSIZEis 32 there and nothing defines
__SYSCALL_WORDSIZE.statvfsalready carriesthe field. This was the FIXME left in #5434.
There is no riscv32 ctest job, so I checked with a probe instead:
offset_of!(statvfs64, f_flag)moves 60 to 64 on riscv32 and stays 72 onx86_64.
Closes #5512