fix: compiling with modern Rust

This commit fixes compiling errors with modern Rust.
This commit is contained in:
ThePedroo
2024-06-16 15:27:05 -03:00
parent 41414c7d71
commit b7adea736a

View File

@@ -1,3 +1,5 @@
use std::ptr::addr_of;
mod kernelsu;
mod magisk;
@@ -36,7 +38,7 @@ pub fn setup() {
}
pub fn get_impl() -> &'static RootImpl {
unsafe { &ROOT_IMPL }
unsafe { &*addr_of!(ROOT_IMPL) }
}
pub fn uid_granted_root(uid: i32) -> bool {