Skip to content

Commit

Permalink
Auto merge of #3296 - devnexen:apple_13_upd, r=JohnTitor
Browse files Browse the repository at this point in the history
darwin adding bunch of macOs Ventura new calls
  • Loading branch information
bors committed Jul 9, 2023
2 parents 2bd687d + a3ba5b3 commit 9bfa899
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,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 @@ -6058,6 +6058,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

0 comments on commit 9bfa899

Please sign in to comment.