Skip to content

Fix #22690: Use correct fstatat mangling on macOS/x64#22689

Merged
thewilsonator merged 1 commit intodlang:stablefrom
s-ludwig:fix_macos_x64_fstatat
Mar 3, 2026
Merged

Fix #22690: Use correct fstatat mangling on macOS/x64#22689
thewilsonator merged 1 commit intodlang:stablefrom
s-ludwig:fix_macos_x64_fstatat

Conversation

@s-ludwig
Copy link
Member

@s-ludwig s-ludwig commented Mar 3, 2026

DMD 2.112.0 has introduced declarations for fstatat, but the x64 version for macOS needs to be mangled with the "$INODE64" suffix (like the other "stat" functions) in order to match the correct stat_t layout.

See https://github.com/apple-oss-distributions/xnu/blob/f6217f891ac0bb64f3d375211650a4c1ff8ca1ea/bsd/sys/stat.h#L573

This fixes a regression in vibe-core that lead to its listDirectory function returning wrong file attributes with DMD 2.112.0 and LDC 1.42.0.

The x64 version of fstatat() needs to be mangled with the "INODE64" suffix in order to match the stat_t layout defined by Druntime.

See https://github.com/apple-oss-distributions/xnu/blob/f6217f891ac0bb64f3d375211650a4c1ff8ca1ea/bsd/sys/stat.h#L573
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @s-ludwig!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "stable + dmd#22689"

@s-ludwig s-ludwig changed the title Fix the fstatat declaration on macOS/x64 Fix #22690: Use correct fstatat mangling on macOS/x64 Mar 3, 2026
@thewilsonator thewilsonator merged commit 623d9c4 into dlang:stable Mar 3, 2026
77 of 78 checks passed
@s-ludwig s-ludwig deleted the fix_macos_x64_fstatat branch March 4, 2026 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants