Skip to content

Expose mknodat/mkfifoat on Apple targets#1625

Open
mattsu2020 wants to merge 3 commits into
bytecodealliance:mainfrom
mattsu2020:mknodat_macos
Open

Expose mknodat/mkfifoat on Apple targets#1625
mattsu2020 wants to merge 3 commits into
bytecodealliance:mainfrom
mattsu2020:mknodat_macos

Conversation

@mattsu2020
Copy link
Copy Markdown

@mattsu2020 mattsu2020 commented May 16, 2026

Summary

  • Expose rustix::fs::{mknodat, mkfifoat} on Apple targets, which were previously gated out with cfg(not(apple))
  • macOS 13 added mknodat/mkfifoat system calls;
  • mkfifoat works automatically as it delegates to mknodat

macOS 13 added mknodat/mkfifoat system calls. Use the same weak-linking
pattern as linkat/unlinkat/renameat: resolve the symbol at runtime via
dlsym, and fall back to mknod/mkfifo when the symbol is unavailable
and dirfd == AT_FDCWD.
macOS 13 and earlier are EOL. Use c::mknodat directly via libc
without weak-linking, matching other platforms.
The use declarations for Dev and FileType were gated with
cfg(not(apple)), causing compilation failures when mknodat became
available on Apple. Remove apple from the exclusion list.
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.

1 participant