From 0e2e14293e79f17acf79da38f410adb6d20b6a0a Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Sat, 4 Jun 2022 21:17:41 +0100 Subject: [PATCH] ucontext usage update on macos 64 bits. closes #2812 --- libc-test/build.rs | 3 +++ src/unix/bsd/apple/b64/aarch64/align.rs | 1 + 2 files changed, 4 insertions(+) diff --git a/libc-test/build.rs b/libc-test/build.rs index a3f940a3e823e..513fa3914ef5f 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -324,6 +324,9 @@ fn test_apple(target: &str) { // macOs 12 minimum "backtrace_async" => true, + // deprecated api + "getcontext" => true, + _ => false, } }); diff --git a/src/unix/bsd/apple/b64/aarch64/align.rs b/src/unix/bsd/apple/b64/aarch64/align.rs index 131e15b69ad94..29db97ec7c473 100644 --- a/src/unix/bsd/apple/b64/aarch64/align.rs +++ b/src/unix/bsd/apple/b64/aarch64/align.rs @@ -15,6 +15,7 @@ s! { pub uc_link: *mut ::ucontext_t, pub uc_mcsize: usize, pub uc_mcontext: mcontext_t, + __mcontext_data: __darwin_mcontext64, } pub struct __darwin_mcontext64 {