瀏覽代碼

C flavored Rust doesn't taste good

Jeremy Soller 6 年之前
父節點
當前提交
6d857f8db7
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/header/time/mod.rs

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

@@ -343,13 +343,13 @@ pub unsafe extern "C" fn time(tloc: *mut time_t) -> time_t {
 }
 
 #[no_mangle]
-pub unsafe extern "C" fn timelocal(tm: *mut struct tm) -> time_t {
+pub unsafe extern "C" fn timelocal(tm: *mut tm) -> time_t {
     //TODO: timezone
     timegm(tm)
 }
 
 #[no_mangle]
-pub unsafe extern "C" fn timegm(tm: *mut struct tm) -> time_t {
+pub unsafe extern "C" fn timegm(tm: *mut tm) -> time_t {
     let mut y = (*tm).tm_year as time_t + 1900;
     let mut m = (*tm).tm_mon as time_t + 1;
     if m <= 2 {