You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
More Rust
This commit is contained in:
@@ -104,11 +104,7 @@ pub unsafe fn ptr_to_str<'a, T>(ptr: *const T) -> &'a str {
|
||||
}
|
||||
|
||||
pub fn errno() -> &'static mut i32 {
|
||||
// On Android, errno is obtained through the __errno function for thread local storage
|
||||
extern "C" {
|
||||
fn __errno() -> *mut i32;
|
||||
}
|
||||
unsafe { &mut *__errno() }
|
||||
unsafe { &mut *libc::__errno() }
|
||||
}
|
||||
|
||||
pub fn error_str() -> &'static str {
|
||||
|
||||
Reference in New Issue
Block a user