Bug 511548

Summary: getdents_filter no longer builds with musl
Product: [Developer tools] valgrind Reporter: Alyssa Ross <hi>
Component: generalAssignee: Julian Seward <jseward>
Status: REPORTED ---    
Severity: normal CC: mingli.yu, sam
Priority: NOR    
Version First Reported In: 3.26 GIT   
Target Milestone: ---   
Platform: NixOS   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Patch to fix the issue
Patch to fix the issue (now including <stdint.h> for Glibc)

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. ***