From b7adea736a2a2b8e6102a8c82d629c764e875c62 Mon Sep 17 00:00:00 2001 From: ThePedroo Date: Sun, 16 Jun 2024 15:27:05 -0300 Subject: [PATCH] fix: compiling with modern Rust This commit fixes compiling errors with modern Rust. --- zygiskd/src/root_impl/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zygiskd/src/root_impl/mod.rs b/zygiskd/src/root_impl/mod.rs index 2f0bf99..32560d6 100644 --- a/zygiskd/src/root_impl/mod.rs +++ b/zygiskd/src/root_impl/mod.rs @@ -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 {