diff --git a/libc-test/semver/apple.txt b/libc-test/semver/apple.txt index f022a006de401..1b548b594a2cb 100644 --- a/libc-test/semver/apple.txt +++ b/libc-test/semver/apple.txt @@ -1913,6 +1913,8 @@ lockf log2phys login_tty lutimes +mach_error_string +mach_error_t madvise malloc_default_zone malloc_good_size diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index d991e379ba79a..48d6edd86aa6c 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -58,6 +58,7 @@ pub type thread_inspect_t = ::mach_port_t; pub type thread_act_t = ::mach_port_t; pub type thread_act_array_t = *mut ::thread_act_t; pub type policy_t = ::c_int; +pub type mach_error_t = ::kern_return_t; pub type mach_vm_address_t = u64; pub type mach_vm_offset_t = u64; pub type mach_vm_size_t = u64; @@ -6209,6 +6210,8 @@ extern "C" { pub fn copyfile_state_get(s: copyfile_state_t, flags: u32, dst: *mut ::c_void) -> ::c_int; pub fn copyfile_state_set(s: copyfile_state_t, flags: u32, src: *const ::c_void) -> ::c_int; + pub fn mach_error_string(error_value: ::mach_error_t) -> *mut ::c_char; + // Added in macOS 10.13 // ISO/IEC 9899:2011 ("ISO C11") K.3.7.4.1 pub fn memset_s(s: *mut ::c_void, smax: ::size_t, c: ::c_int, n: ::size_t) -> ::c_int;