We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ba9c33 commit dfcd443Copy full SHA for dfcd443
crates/viona-api/src/lib.rs
@@ -67,11 +67,14 @@ impl VionaFd {
67
}
68
69
/// Retrieve the minor number of the viona device instance.
70
- /// This is used for matching kernal statistic entries to the viona device.
+ /// This is used for matching kernel statistic entries to the viona device.
71
pub fn instance_id(&self) -> Result<u32> {
72
let meta = self.0.metadata()?;
73
let rdev = meta.rdev();
74
+ #[cfg(not(target_os = "macos"))]
75
let minor = unsafe { libc::minor(rdev) };
76
+ #[cfg(target_os = "macos")]
77
+ let minor = unsafe { libc::minor(rdev as libc::dev_t) as u32 };
78
Ok(minor)
79
80
0 commit comments