diff --git a/src/uucore/Cargo.toml b/src/uucore/Cargo.toml index 65c4d6a01..43866d864 100644 --- a/src/uucore/Cargo.toml +++ b/src/uucore/Cargo.toml @@ -6,6 +6,7 @@ authors = [] [dependencies] libc = "*" time = "*" +winapi = "*" [lib] path = "lib.rs" diff --git a/src/uucore/fs.rs b/src/uucore/fs.rs index 660086202..f875f679b 100644 --- a/src/uucore/fs.rs +++ b/src/uucore/fs.rs @@ -12,7 +12,8 @@ // be backported to stable (<= 1.1). This will likely be dropped // when the path trait stabilizes. -use ::libc; +#[cfg(unix)] +use super::libc; use std::env; use std::fs; use std::io::{Error, ErrorKind, Result}; diff --git a/src/uucore/lib.rs b/src/uucore/lib.rs index 17fd1071f..f5788e8d6 100644 --- a/src/uucore/lib.rs +++ b/src/uucore/lib.rs @@ -1,5 +1,6 @@ extern crate libc; extern crate time; +#[cfg(windows)] extern crate winapi; #[macro_use] mod macros;