Added emscripten ___build_environment mock

This commit is contained in:
Syrus Akbary 2018-11-29 21:59:43 -08:00
parent 8a4d26396d
commit d94e13778a
2 changed files with 5 additions and 0 deletions

View File

@ -106,3 +106,7 @@ pub extern "C" fn _getpagesize() -> u32 {
debug!("emscripten::_getpagesize"); debug!("emscripten::_getpagesize");
16384 16384
} }
pub extern "C" fn ___build_environment(environ: c_int) {
debug!("emscripten::___build_environment {}", environ);
}

View File

@ -118,6 +118,7 @@ pub fn generate_emscripten_env<'a, 'b>() -> ImportObject<&'a str, &'b str> {
import_object.set("env", "_getenv", ImportValue::Func(env::_getenv as _)); import_object.set("env", "_getenv", ImportValue::Func(env::_getenv as _));
import_object.set("env", "_getpwnam", ImportValue::Func(env::_getpwnam as _)); import_object.set("env", "_getpwnam", ImportValue::Func(env::_getpwnam as _));
import_object.set("env", "_getgrnam", ImportValue::Func(env::_getgrnam as _)); import_object.set("env", "_getgrnam", ImportValue::Func(env::_getgrnam as _));
import_object.set("env", "___buildEnvironment", ImportValue::Func(env::___build_environment as _));
// Errno // Errno
import_object.set( import_object.set(
"env", "env",