mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
fix freebds mode_t is u16 but other unix platforms are u32
This commit is contained in:
parent
6c05385d77
commit
5ce3720820
2 changed files with 17 additions and 5 deletions
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue