mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 12:07:46 +00:00
fix macos mode_t is u16 but other unix platforms are u32
This commit is contained in:
parent
88f88e51cc
commit
cdde57608c
1 changed files with 8 additions and 0 deletions
|
@ -1755,8 +1755,16 @@ fn copy_file(
|
||||||
use libc::{
|
use libc::{
|
||||||
S_IRGRP, S_IROTH, S_IRUSR, S_IRWXG, S_IRWXO, S_IRWXU, S_IWGRP, S_IWOTH, S_IWUSR,
|
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 =
|
const MODE_RW_UGO: u32 =
|
||||||
(S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH) as 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;
|
const S_IRWXUGO: u32 = (S_IRWXU | S_IRWXG | S_IRWXO) as u32;
|
||||||
|
|
||||||
match is_explicit_no_preserve_mode {
|
match is_explicit_no_preserve_mode {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue