Skip to content

Commit

Permalink
darwin adding bunch of macOs Ventura new calls
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen committed Jul 9, 2023
1 parent b811b70 commit a3ba5b3
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
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
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
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

0 comments on commit a3ba5b3

Please sign in to comment.