diff --git a/src/common/validation.rs b/src/common/validation.rs index 124fa1dbb6..c9326a5c86 100644 --- a/src/common/validation.rs +++ b/src/common/validation.rs @@ -75,7 +75,10 @@ fn get_canonical_util_name(util_name: &str) -> &str { /// Gets the binary path from command line arguments /// Panics if the binary path cannot be determined #[cfg(any( - not(any(target_os = "linux", target_os = "android")), + not(any( + target_os = "linux", + all(target_os = "android", target_pointer_width = "64") + )), target_env = "musl" ))] pub fn binary_path(args: &mut impl Iterator) -> PathBuf { @@ -88,7 +91,10 @@ pub fn binary_path(args: &mut impl Iterator) -> PathBuf { /// Get actual binary path from kernel, not argv0, to prevent `env -a` from bypassing /// AppArmor, SELinux policies on hard-linked binaries #[cfg(all( - any(target_os = "linux", target_os = "android"), + any( + target_os = "linux", + all(target_os = "android", target_pointer_width = "64") + ), not(target_env = "musl") ))] pub fn binary_path(args: &mut impl Iterator) -> PathBuf {