This commit is contained in:
Jesús Leganés-Combarro 'piranna 2019-05-19 20:24:49 +02:00
parent 2eb5ca1e48
commit f8cfb04e29
2 changed files with 6 additions and 0 deletions

View File

@ -15,6 +15,11 @@ pub fn getTempRet0(ctx: &mut Ctx) -> i32 {
get_emscripten_data(ctx).temp_ret_0
}
pub fn _alarm(_ctx: &mut Ctx, _seconds: u32) -> i32 {
debug!("emscripten::_alarm({})", _seconds);
0
}
pub fn _atexit(_ctx: &mut Ctx, _func: i32) -> i32 {
debug!("emscripten::_atexit");
// TODO: implement atexit properly

View File

@ -722,6 +722,7 @@ pub fn generate_emscripten_env(globals: &mut EmscriptenGlobals) -> ImportObject
"_dlsym" => func!(crate::linking::_dlsym),
// wasm32-unknown-emscripten
"_alarm" => func!(crate::emscripten_target::_alarm),
"_atexit" => func!(crate::emscripten_target::_atexit),
"setTempRet0" => func!(crate::emscripten_target::setTempRet0),
"getTempRet0" => func!(crate::emscripten_target::getTempRet0),