mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 19:47:45 +00:00
fix macos-12 mode_t is u16 but other unix platforms are u32
This commit is contained in:
parent
74c393974c
commit
6c05385d77
1 changed files with 12 additions and 4 deletions
|
@ -1749,15 +1749,23 @@ fn copy_file(
|
|||
S_IRGRP, S_IROTH, S_IRUSR, S_IRWXG, S_IRWXO, S_IRWXU, S_IWGRP, S_IWOTH, S_IWUSR,
|
||||
};
|
||||
|
||||
#[cfg(not(any(target_os = "android", target_os = "macos")))]
|
||||
#[cfg(not(any(
|
||||
target_os = "android",
|
||||
target_os = "macos",
|
||||
target_os = "macos-12"
|
||||
)))]
|
||||
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")))]
|
||||
#[cfg(not(any(
|
||||
target_os = "android",
|
||||
target_os = "macos",
|
||||
target_os = "macos-12"
|
||||
)))]
|
||||
const S_IRWXUGO: u32 = S_IRWXU | S_IRWXG | S_IRWXO;
|
||||
|
||||
#[cfg(any(target_os = "android", target_os = "macos"))]
|
||||
#[cfg(any(target_os = "android", target_os = "macos", target_os = "macos-12"))]
|
||||
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"))]
|
||||
#[cfg(any(target_os = "android", target_os = "macos", target_os = "macos-12"))]
|
||||
const S_IRWXUGO: u32 = (S_IRWXU | S_IRWXG | S_IRWXO) as u32;
|
||||
|
||||
match is_explicit_no_preserve_mode {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue