diff --git a/src/commands/ps.rs b/src/commands/ps.rs index 970a678447..4913cb0a33 100644 --- a/src/commands/ps.rs +++ b/src/commands/ps.rs @@ -28,12 +28,12 @@ impl WholeStreamCommand for PS { fn ps(args: CommandArgs, _registry: &CommandRegistry) -> Result { let system; - #[cfg(linux)] + #[cfg(target_os = "linux")] { system = sysinfo::System::new(); } - #[cfg(not(linux))] + #[cfg(not(target_os = "linux"))] { let mut sy = sysinfo::System::new_with_specifics(RefreshKind::new().with_processes()); sy.refresh_processes();