Skip to content

Commit

Permalink
ksud: fix multiple cfg err
Browse files Browse the repository at this point in the history
  • Loading branch information
rsuntk committed Jul 30, 2024
1 parent 6a63799 commit 3fc758c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion userspace/ksud/src/su.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ pub fn root_shell() -> Result<()> {
if free_idx < matches.free.len() {
let name = &matches.free[free_idx];
uid = unsafe {
#[cfg(target_arch = "aarch64", target_arch="arm")]
// allow compilation on arm64 or arm
#[cfg(all(target_arch = "aarch64", target_arch = "arm"))]
let pw = libc::getpwnam(name.as_ptr()).as_ref();
#[cfg(target_arch = "x86_64")]
let pw = libc::getpwnam(name.as_ptr() as *const i8).as_ref();
Expand Down

0 comments on commit 3fc758c

Please sign in to comment.