You've already forked KernelSU-Next
mirror of
https://github.com/KernelSU-Next/KernelSU-Next.git
synced 2025-08-27 23:46:34 +00:00
src: add x86_64 support
This commit is contained in:
@@ -202,6 +202,10 @@ pub fn root_shell() -> Result<()> {
|
||||
if free_idx < matches.free.len() {
|
||||
let name = &matches.free[free_idx];
|
||||
uid = unsafe {
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
let pw = libc::getpwnam(name.as_ptr() as *const i8).as_ref();
|
||||
|
||||
#[cfg(not(target_arch = "x86_64"))]
|
||||
let pw = libc::getpwnam(name.as_ptr()).as_ref();
|
||||
match pw {
|
||||
Some(pw) => pw.pw_uid,
|
||||
|
||||
Reference in New Issue
Block a user