Skip to content

Commit 3f46ce3

Browse files
committed
Apple: add mach_task_self back
This was removed in 56d665c ("macOs various updates") because tests failed, but apparently this still exists. Try adding it back.
1 parent 86b04cb commit 3f46ce3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/unix/bsd/apple/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6431,6 +6431,7 @@ extern "C" {
64316431
out_processor_infoCnt: *mut mach_msg_type_number_t,
64326432
) -> ::kern_return_t;
64336433

6434+
pub static mut mach_task_self_: ::mach_port_t;
64346435
pub fn task_for_pid(
64356436
host: ::mach_port_t,
64366437
pid: ::pid_t,
@@ -6547,6 +6548,10 @@ extern "C" {
65476548
) -> ::c_int;
65486549
}
65496550

6551+
pub unsafe fn mach_task_self() -> ::mach_port_t {
6552+
mach_task_self_
6553+
}
6554+
65506555
cfg_if! {
65516556
if #[cfg(target_os = "macos")] {
65526557
extern "C" {

0 commit comments

Comments
 (0)