diff --git a/src/chmod/chmod.rs b/src/chmod/chmod.rs index 2fe308893..032ac926c 100644 --- a/src/chmod/chmod.rs +++ b/src/chmod/chmod.rs @@ -20,6 +20,7 @@ use std::fs; use std::os::unix::fs::{MetadataExt, PermissionsExt}; use std::path::Path; use walker::Walker; +#[cfg(not(windows))] use uucore::mode; const NAME: &'static str = "chmod"; diff --git a/src/install/mode.rs b/src/install/mode.rs index 5ed37adaa..726b359df 100644 --- a/src/install/mode.rs +++ b/src/install/mode.rs @@ -2,6 +2,7 @@ extern crate libc; use std::path::Path; use std::fs; +#[cfg(not(windows))] use uucore::mode; /// Takes a user-supplied string and tries to parse to u16 mode bitmask. diff --git a/src/uucore/lib.rs b/src/uucore/lib.rs index 2bbca4b30..c1f5b5277 100644 --- a/src/uucore/lib.rs +++ b/src/uucore/lib.rs @@ -17,9 +17,9 @@ pub mod utf8; pub mod encoding; #[cfg(feature = "parse_time")] pub mod parse_time; -#[cfg(feature = "mode")] -pub mod mode; +#[cfg(all(not(windows), feature = "mode"))] +pub mod mode; #[cfg(all(unix, not(target_os = "fuchsia"), feature = "utmpx"))] pub mod utmpx; #[cfg(all(unix, feature = "utsname"))]