Repository navigation
apple: add posix_spawn_file_actions_add(f)chdir(_np) - #5558
Conversation
|
The NetBSD failure is unrelated to this PR: the package mirror failed, and the retry in |
There was a problem hiding this comment.
@madsmtm we probably shouldn't add anything marked __SPI_AVAILABLE, right?
| fd: c_int, | ||
| newfd: c_int, | ||
| ) -> c_int; | ||
| // Available starting with macOS 10.15. |
There was a problem hiding this comment.
We don't have these comments elsewhere, could you delete them?
There was a problem hiding this comment.
Deleted, thanks. I'll hold off on anything else until you and @madsmtm have settled the __SPI_AVAILABLE question.
Add the chdir file actions on macOS: the `_np` versions, available since macOS 10.15, and the POSIX.1-2024 names, available since macOS 26.0. On the other Apple platforms they are only SPI. Sources: https://github.com/apple-oss-distributions/xnu/blob/f6217f891ac0bb64f3d375211650a4c1ff8ca1ea/libsyscall/wrappers/spawn/spawn.h#L72-L76 https://github.com/apple-oss-distributions/xnu/blob/f6217f891ac0bb64f3d375211650a4c1ff8ca1ea/libsyscall/wrappers/spawn/spawn.h#L182-L186 Part of rust-lang#3958
3d48f1d to
13c4578
Compare
Yes, we shouldn't, those are for Apple's embedded OSes IIUC. |
Add the chdir file actions on macOS: the `_np` versions, available since macOS 10.15, and the POSIX.1-2024 names, available since macOS 26.0. On the other Apple platforms they are only SPI. Sources: https://github.com/apple-oss-distributions/xnu/blob/f6217f891ac0bb64f3d375211650a4c1ff8ca1ea/libsyscall/wrappers/spawn/spawn.h#L72-L76 https://github.com/apple-oss-distributions/xnu/blob/f6217f891ac0bb64f3d375211650a4c1ff8ca1ea/libsyscall/wrappers/spawn/spawn.h#L182-L186 Part of rust-lang#3958 (backport <rust-lang#5558>) (cherry picked from commit 9e01c7f)
Description
Add
posix_spawn_file_actions_addchdir_npandposix_spawn_file_actions_addfchdir_np, available since macOS 10.15, and the POSIX.1-2024posix_spawn_file_actions_addchdirandposix_spawn_file_actions_addfchdir, available since macOS 26.0.They are macOS only. The header marks them unavailable on the other Apple platforms, where XNU only has them as SPI.
The XNU source still says
macos(16.0)for the POSIX names, while the SDK header saysmacos(26.0), which is the version they shipped in.This is the Apple part of #3958.
Checklist
libc-test/semverhave been updated*LASTor*MAXhave the standard doc comment (none added)cargo test -p libc-test --target aarch64-apple-darwinwith the macOS 26.2 SDK, pluscargo checkforaarch64-apple-iosandx86_64-apple-darwin)@rustbot label +stable-nominated