1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 19:47:45 +00:00

fix macos mode_t is u16 but other unix platforms are u32

This commit is contained in:
tommady 2023-10-04 08:06:30 +00:00
parent 88f88e51cc
commit cdde57608c
No known key found for this signature in database
GPG key ID: 175B664929DF2F2F

View file

@ -1755,8 +1755,16 @@ fn copy_file(
use libc::{
S_IRGRP, S_IROTH, S_IRUSR, S_IRWXG, S_IRWXO, S_IRWXU, S_IWGRP, S_IWOTH, S_IWUSR,
};
#[cfg(not(macos))]
const MODE_RW_UGO: u32 = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH;
#[cfg(not(macos))]
const S_IRWXUGO: u32 = S_IRWXU | S_IRWXG | S_IRWXO;
#[cfg(macos)]
const MODE_RW_UGO: u32 =
(S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH) as u32;
#[cfg(macos)]
const S_IRWXUGO: u32 = (S_IRWXU | S_IRWXG | S_IRWXO) as u32;
match is_explicit_no_preserve_mode {