Browse Source

Merge branch 'asctime-char-cast' into 'master'

Avoid assuming c_char is i8 in asctime()

See merge request redox-os/relibc!307
Jeremy Soller 4 years ago
parent
commit
f285128657
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]