diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index 8dc4d42c4bab2..80a042849ecb6 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -6431,6 +6431,7 @@ extern "C" { out_processor_infoCnt: *mut mach_msg_type_number_t, ) -> ::kern_return_t; + pub static mut mach_task_self_: ::mach_port_t; pub fn task_for_pid( host: ::mach_port_t, pid: ::pid_t, @@ -6547,6 +6548,10 @@ extern "C" { ) -> ::c_int; } +pub unsafe fn mach_task_self() -> ::mach_port_t { + mach_task_self_ +} + cfg_if! { if #[cfg(target_os = "macos")] { extern "C" {