Skip to content

Commit

Permalink
Apple: add mach_task_self back
Browse files Browse the repository at this point in the history
This was removed in 56d665c ("macOs various updates") because tests
failed, but apparently this still exists. Try adding it back.
  • Loading branch information
tgross35 committed Nov 18, 2024
1 parent 86b04cb commit 3f46ce3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/unix/bsd/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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" {
Expand Down

0 comments on commit 3f46ce3

Please sign in to comment.