1
Fork 0
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:
tommady 2023-10-04 08:31:07 +00:00
parent 74c393974c
commit 6c05385d77
No known key found for this signature in database
GPG key ID: 175B664929DF2F2F

View file

@ -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 {