mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
uucore/mode: add cast for some platforms
This commit is contained in:
parent
5825889931
commit
38afdd6ab4
2 changed files with 3 additions and 3 deletions
|
@ -326,8 +326,8 @@ impl Chmoder {
|
|||
show_error!(
|
||||
"{}: new permissions are {}, not {}",
|
||||
file.display(),
|
||||
display_permissions_unix(new_mode, false),
|
||||
display_permissions_unix(naively_expected_new_mode, false)
|
||||
display_permissions_unix(new_mode as mode_t, false),
|
||||
display_permissions_unix(naively_expected_new_mode as mode_t, false)
|
||||
);
|
||||
return Err(1);
|
||||
}
|
||||
|
|
|
@ -143,7 +143,7 @@ pub fn parse_mode(mode: &str) -> Result<mode_t, String> {
|
|||
pub fn get_umask() -> u32 {
|
||||
let mask = unsafe { umask(0) };
|
||||
unsafe { umask(mask) };
|
||||
mask
|
||||
mask as u32
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue