More Rust

This commit is contained in:
topjohnwu
2022-08-15 11:53:51 -07:00
parent 40aab13601
commit 4d9b7e7114
4 changed files with 369 additions and 264 deletions
+1 -5
View File
@@ -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 {