From cb223698d35c15b50ec4707055f535bdecb4fe1d Mon Sep 17 00:00:00 2001 From: "@RandyMcMillan" Date: Mon, 13 Jan 2025 14:41:31 -0500 Subject: [PATCH] src/platform/unix.rs:cfg detect macos (#447) --- cryptovec/src/platform/unix.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cryptovec/src/platform/unix.rs b/cryptovec/src/platform/unix.rs index 9a8ab32f..3fd8e200 100644 --- a/cryptovec/src/platform/unix.rs +++ b/cryptovec/src/platform/unix.rs @@ -27,7 +27,10 @@ pub fn memset(ptr: *mut u8, value: i32, size: usize) { #[allow(clippy::panic)] unsafe fn panic_libc_error(msg: &str) { + #[cfg(not(target_os = "macos"))] let errno = *libc::__errno_location(); + #[cfg(target_os = "macos")] + let errno = *libc::__error(); const ERRMAXLEN: usize = 255; const INVALID_ERR: &str = "Unknown"; let mut errdesc = [0u8; ERRMAXLEN];