diff --git a/lib/emscripten/src/syscalls/mod.rs b/lib/emscripten/src/syscalls/mod.rs index c6590cb2d..71cd43549 100644 --- a/lib/emscripten/src/syscalls/mod.rs +++ b/lib/emscripten/src/syscalls/mod.rs @@ -46,10 +46,10 @@ use std::slice; // Another conditional constant for name resolution: Macos et iOS use // SO_NOSIGPIPE as a setsockopt flag to disable SIGPIPE emission on socket. // Other platforms do otherwise. +use crate::env::get_emscripten_data; +use crate::utils::copy_cstr_into_wasm; #[cfg(target_os = "darwin")] use libc::SO_NOSIGPIPE; -use crate::utils::copy_cstr_into_wasm; -use crate::env::get_emscripten_data; use std::ffi::CString; #[cfg(not(target_os = "darwin"))] @@ -203,9 +203,7 @@ pub fn ___syscall183(ctx: &mut Ctx, buf: u32, _size: u32) -> u32 { let offset = unsafe { copy_cstr_into_wasm(ctx, path_c_string.as_ptr()) }; offset } - Err(e) => { - unimplemented!() - } + Err(e) => panic!("Failed to read current directory from environment."), } } diff --git a/lib/emscripten/tests/emtests/mod.rs b/lib/emscripten/tests/emtests/mod.rs index 37c88a041..a280fc48a 100644 --- a/lib/emscripten/tests/emtests/mod.rs +++ b/lib/emscripten/tests/emtests/mod.rs @@ -54,6 +54,7 @@ mod test_funcptrfunc; mod test_funcs; mod test_functionpointer_libfunc_varargs; mod test_fwrite_0; +mod test_getcwd; mod test_getgep; mod test_getloadavg; mod test_getopt;