mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 06:15:33 +00:00
Added mock for _strftime
This commit is contained in:
parent
ac51a33d5e
commit
0ba5f1ecb7
@ -329,6 +329,11 @@ pub fn generate_emscripten_env<'a, 'b>() -> ImportObject<&'a str, &'b str> {
|
||||
"_time",
|
||||
ImportValue::Func(time::_time as _),
|
||||
);
|
||||
import_object.set(
|
||||
"env",
|
||||
"_strftime",
|
||||
ImportValue::Func(time::_strftime as _),
|
||||
);
|
||||
import_object.set(
|
||||
"env",
|
||||
"_localtime_r",
|
||||
@ -345,7 +350,7 @@ pub fn generate_emscripten_env<'a, 'b>() -> ImportObject<&'a str, &'b str> {
|
||||
mock_external!(import_object, _usleep);
|
||||
// mock_external!(import_object, _time);
|
||||
mock_external!(import_object, _sysconf);
|
||||
mock_external!(import_object, _strftime);
|
||||
// mock_external!(import_object, _strftime);
|
||||
mock_external!(import_object, _sigsuspend);
|
||||
mock_external!(import_object, _sigprocmask);
|
||||
mock_external!(import_object, _sigemptyset);
|
||||
|
@ -82,3 +82,9 @@ pub extern "C" fn _time(time_p: u32, instance: &mut Instance) -> time_t {
|
||||
time(time_p_addr)
|
||||
}
|
||||
}
|
||||
|
||||
/// emscripten: _strftime
|
||||
pub extern "C" fn _strftime(s_ptr: c_int, maxsize: u32, format_ptr: c_int, tm_ptr: c_int, instance: &mut Instance) -> time_t {
|
||||
debug!("emscripten::_strftime {} {} {} {}", s_ptr, maxsize, format_ptr, tm_ptr);
|
||||
0
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user