diff --git a/cli/src/util/zipper.rs b/cli/src/util/zipper.rs index 45dd3b7e85d..0e9939d4db5 100644 --- a/cli/src/util/zipper.rs +++ b/cli/src/util/zipper.rs @@ -88,7 +88,13 @@ where use std::io::Read; use std::os::unix::ffi::OsStringExt; - if matches!(file.unix_mode(), Some(mode) if mode & S_IFLNK == S_IFLNK) { + #[cfg(target_os = "macos")] + const S_IFLINK_32: u32 = S_IFLNK as u32; + + #[cfg(target_os = "linux")] + const S_IFLINK_32: u32 = S_IFLNK; + + if matches!(file.unix_mode(), Some(mode) if mode & S_IFLINK_32 == S_IFLINK_32) { let mut link_to = Vec::new(); file.read_to_end(&mut link_to).map_err(|e| { wrap(