diff --git a/crates/viona-api/src/lib.rs b/crates/viona-api/src/lib.rs index 56491fda8..69ad2c53d 100644 --- a/crates/viona-api/src/lib.rs +++ b/crates/viona-api/src/lib.rs @@ -67,11 +67,14 @@ impl VionaFd { } /// Retrieve the minor number of the viona device instance. - /// This is used for matching kernal statistic entries to the viona device. + /// This is used for matching kernel statistic entries to the viona device. pub fn instance_id(&self) -> Result { let meta = self.0.metadata()?; let rdev = meta.rdev(); + #[cfg(not(target_os = "macos"))] let minor = unsafe { libc::minor(rdev) }; + #[cfg(target_os = "macos")] + let minor = unsafe { libc::minor(rdev as libc::dev_t) as u32 }; Ok(minor) }