diff --git a/src/unix/apple/system.rs b/src/unix/apple/system.rs index c9bf4ffc3..c58f86a91 100644 --- a/src/unix/apple/system.rs +++ b/src/unix/apple/system.rs @@ -7,6 +7,7 @@ use crate::sys::utils::{get_sys_value, get_sys_value_by_name}; use crate::{Cpu, CpuRefreshKind, LoadAvg, MemoryRefreshKind, Pid, Process, ProcessRefreshKind}; +#[cfg(all(target_os = "macos", not(feature = "apple-sandbox")))] use std::cell::UnsafeCell; use std::collections::HashMap; use std::ffi::CStr; @@ -34,9 +35,12 @@ pub(crate) struct SystemInner { cpus: CpusWrapper, } +#[cfg(all(target_os = "macos", not(feature = "apple-sandbox")))] pub(crate) struct Wrap<'a>(pub UnsafeCell<&'a mut HashMap>); +#[cfg(all(target_os = "macos", not(feature = "apple-sandbox")))] unsafe impl<'a> Send for Wrap<'a> {} +#[cfg(all(target_os = "macos", not(feature = "apple-sandbox")))] unsafe impl<'a> Sync for Wrap<'a> {} fn boot_time() -> u64 { diff --git a/src/unix/linux/component.rs b/src/unix/linux/component.rs index f0cf2d25e..1cbed6734 100644 --- a/src/unix/linux/component.rs +++ b/src/unix/linux/component.rs @@ -155,6 +155,7 @@ enum TermalSensorType { IntelPECI, /// Not all types are supported by all chips so we keep space for /// unknown sensors. + #[allow(dead_code)] Unknown(u8), }