Skip to content

Commit de8f1ba

Browse files
committed
fix ksucalls, same now
1 parent d97d01e commit de8f1ba

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

userspace/ksud/src/ksucalls.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ static INFO_CACHE: OnceLock<GetInfoCmd> = OnceLock::new();
4848
const KSU_INSTALL_MAGIC1: u32 = 0xDEADBEEF;
4949
const KSU_INSTALL_MAGIC2: u32 = 0xCAFEBABE;
5050

51+
#[cfg(any(target_os = "linux", target_os = "android"))]
5152
fn scan_driver_fd() -> Option<RawFd> {
5253
let fd_dir = fs::read_dir("/proc/self/fd").ok()?;
5354

@@ -67,6 +68,7 @@ fn scan_driver_fd() -> Option<RawFd> {
6768
}
6869

6970
// Get cached driver fd
71+
#[cfg(any(target_os = "linux", target_os = "android"))]
7072
fn init_driver_fd() -> Option<RawFd> {
7173
let fd = scan_driver_fd();
7274
if fd.is_none() {

0 commit comments

Comments
 (0)