chmod, install, uucore: fix build on Windows

This commit is contained in:
Alex Lyon 2017-12-10 21:21:24 -08:00
parent 479aeed9f6
commit 2e7f969404
No known key found for this signature in database
GPG key ID: B517F04B325131B1
3 changed files with 4 additions and 2 deletions

View file

@ -20,6 +20,7 @@ use std::fs;
use std::os::unix::fs::{MetadataExt, PermissionsExt}; use std::os::unix::fs::{MetadataExt, PermissionsExt};
use std::path::Path; use std::path::Path;
use walker::Walker; use walker::Walker;
#[cfg(not(windows))]
use uucore::mode; use uucore::mode;
const NAME: &'static str = "chmod"; const NAME: &'static str = "chmod";

View file

@ -2,6 +2,7 @@ extern crate libc;
use std::path::Path; use std::path::Path;
use std::fs; use std::fs;
#[cfg(not(windows))]
use uucore::mode; use uucore::mode;
/// Takes a user-supplied string and tries to parse to u16 mode bitmask. /// Takes a user-supplied string and tries to parse to u16 mode bitmask.

View file

@ -17,9 +17,9 @@ pub mod utf8;
pub mod encoding; pub mod encoding;
#[cfg(feature = "parse_time")] #[cfg(feature = "parse_time")]
pub mod 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"))] #[cfg(all(unix, not(target_os = "fuchsia"), feature = "utmpx"))]
pub mod utmpx; pub mod utmpx;
#[cfg(all(unix, feature = "utsname"))] #[cfg(all(unix, feature = "utsname"))]