From 74c393974c7c5582d2251a54b68805e5eb1dbf0a Mon Sep 17 00:00:00 2001 From: tommady Date: Wed, 4 Oct 2023 08:17:40 +0000 Subject: [PATCH] fix android mode_t is u16 but other unix platforms are u32 --- src/uu/cp/src/cp.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/uu/cp/src/cp.rs b/src/uu/cp/src/cp.rs index c45436b8d..c3ad34118 100644 --- a/src/uu/cp/src/cp.rs +++ b/src/uu/cp/src/cp.rs @@ -1749,15 +1749,15 @@ fn copy_file( S_IRGRP, S_IROTH, S_IRUSR, S_IRWXG, S_IRWXO, S_IRWXU, S_IWGRP, S_IWOTH, S_IWUSR, }; - #[cfg(not(macos))] + #[cfg(not(any(target_os = "android", target_os = "macos")))] const MODE_RW_UGO: u32 = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH; - #[cfg(not(macos))] + #[cfg(not(any(target_os = "android", target_os = "macos")))] const S_IRWXUGO: u32 = S_IRWXU | S_IRWXG | S_IRWXO; - #[cfg(macos)] + #[cfg(any(target_os = "android", target_os = "macos"))] const MODE_RW_UGO: u32 = (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH) as u32; - #[cfg(macos)] + #[cfg(any(target_os = "android", target_os = "macos"))] const S_IRWXUGO: u32 = (S_IRWXU | S_IRWXG | S_IRWXO) as u32; match is_explicit_no_preserve_mode {