Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

darwin adding bunch of macOs Ventura new calls #3296

Merged
merged 1 commit into from
Jul 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,9 @@ fn test_apple(target: &str) {
// FIXME: ABI has been changed on recent macOSes.
"os_unfair_lock_assert_owner" | "os_unfair_lock_assert_not_owner" => true,

// FIXME: Once the SDK get updated to Ventura's level
"freadlink" | "mknodat" | "mkfifoat" => true,

_ => false,
}
});
Expand Down
3 changes: 3 additions & 0 deletions libc-test/semver/apple.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1871,6 +1871,7 @@ flistxattr
fmemopen
fmount
forkpty
freadlink
freeifaddrs
freelocale
fremovexattr
Expand Down Expand Up @@ -1994,6 +1995,8 @@ memset_s
mem_entry_name_port_t
mincore
mkdirat
mkfifoat
mknodat
mkstemps
mount
msghdr
Expand Down
9 changes: 9 additions & 0 deletions src/unix/bsd/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5905,6 +5905,15 @@ extern "C" {

pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
pub fn basename(path: *mut ::c_char) -> *mut ::c_char;

pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char, mode: ::mode_t) -> ::c_int;
pub fn mknodat(
dirfd: ::c_int,
pathname: *const ::c_char,
mode: ::mode_t,
dev: dev_t,
) -> ::c_int;
pub fn freadlink(fd: ::c_int, buf: *mut ::c_char, size: ::size_t) -> ::c_int;
}

pub unsafe fn mach_task_self() -> ::mach_port_t {
Expand Down