Browse Source

Avoid assuming c_char is i8

Peter Limkilde Svendsen 4 years ago
parent
commit
23b2eb2573
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/header/time/mod.rs

+ 1 - 1
src/header/time/mod.rs

@@ -72,7 +72,7 @@ pub struct sigevent;
 
 #[no_mangle]
 pub unsafe extern "C" fn asctime(timeptr: *const tm) -> *mut c_char {
-    asctime_r(timeptr, &mut ASCTIME as *mut [i8; 26] as *mut i8)
+    asctime_r(timeptr, ASCTIME.as_mut_ptr().cast())
 }
 
 #[no_mangle]