diff --git a/src/uu/cp/src/cp.rs b/src/uu/cp/src/cp.rs index ddb3b2614..4370ca619 100644 --- a/src/uu/cp/src/cp.rs +++ b/src/uu/cp/src/cp.rs @@ -9,7 +9,7 @@ // For the full copyright and license information, please view the LICENSE file // that was distributed with this source code. -// spell-checker:ignore (ToDO) ficlone ftruncate linkgs lstat nlink nlinks pathbuf pwrite reflink strs xattrs symlinked +// spell-checker:ignore (ToDO) ficlone ftruncate linkgs lstat nlink nlinks pathbuf pwrite reflink strs xattrs symlinked fiemap #[macro_use] extern crate quick_error; @@ -22,7 +22,9 @@ use std::env; #[cfg(not(windows))] use std::ffi::CString; use std::fs::{self, File, OpenOptions}; -use std::io::{self, stderr, stdin, Read, Write}; +#[cfg(any(target_os = "linux", target_os = "android"))] +use std::io::Read; +use std::io::{self, stderr, stdin, Write}; #[cfg(unix)] use std::os::unix::ffi::OsStrExt; #[cfg(unix)] @@ -1681,7 +1683,7 @@ fn copy_no_cow_fallback( /// If `fallback` is true and there is a failure performing the clone, /// then this function performs a standard [`std::fs::copy`]. Otherwise, /// this function returns an error. -#[cfg(unix)] +#[cfg(any(target_os = "linux", target_os = "android"))] fn clone
(source: P, dest: P, fallback: bool) -> std::io::Result<()>
where
P: AsRef (source: P, dest: P) -> std::io::Result<()>
where
P: AsRef