Skip to content

Commit c96fea2

Browse files
committed
Add mach_error_string (and mach_error_t)
1 parent 2c0250f commit c96fea2

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

libc-test/semver/apple.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1912,6 +1912,8 @@ lockf
19121912
log2phys
19131913
login_tty
19141914
lutimes
1915+
mach_error_string
1916+
mach_error_t
19151917
madvise
19161918
malloc_default_zone
19171919
malloc_good_size

src/unix/bsd/apple/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ pub type thread_inspect_t = ::mach_port_t;
5858
pub type thread_act_t = ::mach_port_t;
5959
pub type thread_act_array_t = *mut ::thread_act_t;
6060
pub type policy_t = ::c_int;
61+
pub type mach_error_t = ::kern_return_t;
6162
pub type mach_vm_address_t = u64;
6263
pub type mach_vm_offset_t = u64;
6364
pub type mach_vm_size_t = u64;
@@ -6202,6 +6203,8 @@ extern "C" {
62026203
pub fn copyfile_state_get(s: copyfile_state_t, flags: u32, dst: *mut ::c_void) -> ::c_int;
62036204
pub fn copyfile_state_set(s: copyfile_state_t, flags: u32, src: *const ::c_void) -> ::c_int;
62046205

6206+
pub fn mach_error_string(error_value: ::mach_error_t) -> *mut ::c_char;
6207+
62056208
// Added in macOS 10.13
62066209
// ISO/IEC 9899:2011 ("ISO C11") K.3.7.4.1
62076210
pub fn memset_s(s: *mut ::c_void, smax: ::size_t, c: ::c_int, n: ::size_t) -> ::c_int;

0 commit comments

Comments
 (0)