From 2a18e09401a9dba10ec022e34c66632fc6e8d614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=A6=E7=92=83=E9=85=B1?= Date: Thu, 21 May 2026 18:13:46 +0800 Subject: [PATCH] chore: restrict Android cfg too 64-bit to match `linux_execfn` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: 白彩恋 <169267914+shirorren@users.noreply.github.com> --- src/common/validation.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/common/validation.rs b/src/common/validation.rs index 124fa1dbb64..c9326a5c865 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 {