Bug 511548 - getdents_filter no longer builds with musl
Summary: getdents_filter no longer builds with musl
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: 3.26 GIT
Platform: NixOS Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
: 511978 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-11-02 21:15 UTC by Alyssa Ross
Modified: 2025-11-13 08:16 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Patch to fix the issue (1.25 KB, patch)
2025-11-02 21:15 UTC, Alyssa Ross
Details
Patch to fix the issue (now including <stdint.h> for Glibc) (1.40 KB, patch)
2025-11-03 08:15 UTC, Alyssa Ross
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alyssa Ross 2025-11-02 21:15:30 UTC
Created attachment 186435 [details]
Patch to fix the issue

Since commit b2c27072b ("Deal with linux arches that don't have getdents, only getdents64"), building for musl fails due to ino64_t and off64_t being undefined.

The *64_t types are transitional APIs for applications that do not yet fully support large files on 32-bit platforms, and musl no longer provides them.  Since this is for a raw syscall anyway, it doesn't make sense to use libc-specific types here anyway, so in the attached patch I've changed this to match the definition of the struct used in the kernel (except there the kernel-specific u64 and s64 typedefs are used instead).
Comment 1 Alyssa Ross 2025-11-03 08:15:16 UTC
Created attachment 186451 [details]
Patch to fix the issue (now including <stdint.h> for Glibc)
Comment 2 Mark Wielaard 2025-11-12 10:12:50 UTC
*** Bug 511978 has been marked as a duplicate of this bug. ***