From 899bd5c91973a221ad28aabe4f9529be7d95efa2 Mon Sep 17 00:00:00 2001 From: Steve Akinyemi Date: Tue, 11 Dec 2018 19:24:47 +0100 Subject: [PATCH] Fix failing compilation --- src/apis/emscripten/time.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apis/emscripten/time.rs b/src/apis/emscripten/time.rs index ee341d653..3d1ad8b92 100644 --- a/src/apis/emscripten/time.rs +++ b/src/apis/emscripten/time.rs @@ -174,7 +174,6 @@ pub extern "C" fn _localtime(time_p: u32, instance: &mut Instance) -> c_int { tm_struct_offset as _ } } - /// emscripten: _localtime_r pub extern "C" fn _localtime_r(time_p: u32, result: u32, instance: &mut Instance) -> c_int { debug!("emscripten::_localtime_r {}", time_p); @@ -184,6 +183,7 @@ pub extern "C" fn _localtime_r(time_p: u32, result: u32, instance: &mut Instance unsafe { let time_p_addr = instance.memory_offset_addr(0, time_p as _) as *mut i64; + let result_addr = instance.memory_offset_addr(0, result as _) as *mut guest_tm; let mut result_tm = tm { tm_sec: (*result_addr).tm_sec,