diff --git a/src/ls/ls.rs b/src/ls/ls.rs index 5b8d21678..56acc97dc 100644 --- a/src/ls/ls.rs +++ b/src/ls/ls.rs @@ -14,12 +14,15 @@ extern crate termsize; extern crate time; extern crate unicode_width; extern crate number_prefix; -extern crate isatty; -use isatty::stdout_isatty; use number_prefix::{Standalone, Prefixed, decimal_prefix}; use term_grid::{Cell, Direction, Filling, Grid, GridOptions}; use time::{strftime, Timespec}; +#[cfg(unix)] +extern crate isatty; +#[cfg(unix)] +use isatty::stdout_isatty; + #[cfg(unix)] #[macro_use] extern crate lazy_static; diff --git a/tests/test_who.rs b/tests/test_who.rs index 039f2e86c..539b3fe9c 100644 --- a/tests/test_who.rs +++ b/tests/test_who.rs @@ -1,7 +1,7 @@ +#[cfg(target_os = "linux")] use common::util::*; - #[cfg(target_os = "linux")] #[test] fn test_count() {