diff --git a/src/uu/cp/src/cp.rs b/src/uu/cp/src/cp.rs index 1a9d5059d..f8c5ef3ce 100644 --- a/src/uu/cp/src/cp.rs +++ b/src/uu/cp/src/cp.rs @@ -1752,20 +1752,32 @@ fn copy_file( #[cfg(not(any( target_os = "android", target_os = "macos", - target_os = "macos-12" + target_os = "macos-12", + target_os = "freebds", )))] const MODE_RW_UGO: u32 = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH; #[cfg(not(any( target_os = "android", target_os = "macos", - target_os = "macos-12" + target_os = "macos-12", + target_os = "freebds", )))] const S_IRWXUGO: u32 = S_IRWXU | S_IRWXG | S_IRWXO; - #[cfg(any(target_os = "android", target_os = "macos", target_os = "macos-12"))] + #[cfg(any( + target_os = "android", + target_os = "macos", + target_os = "macos-12", + target_os = "freebds", + ))] const MODE_RW_UGO: u32 = (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH) as u32; - #[cfg(any(target_os = "android", target_os = "macos", target_os = "macos-12"))] + #[cfg(any( + target_os = "android", + target_os = "macos", + target_os = "macos-12", + target_os = "freebds", + ))] const S_IRWXUGO: u32 = (S_IRWXU | S_IRWXG | S_IRWXO) as u32; match is_explicit_no_preserve_mode { diff --git a/tests/by-util/test_cp.rs b/tests/by-util/test_cp.rs index e85cd0c57..96b47cd43 100644 --- a/tests/by-util/test_cp.rs +++ b/tests/by-util/test_cp.rs @@ -1553,7 +1553,7 @@ fn test_cp_preserve_links_case_7() { } #[test] -#[cfg(all(unix, not(target_os = "freebsd")))] +#[cfg(all(unix))] fn test_cp_no_preserve_mode_case() { use libc::umask; use uucore::fs as uufs;