Skip to content

Commit

Permalink
Fix failing build on some architectures by using c_char instead of i8
Browse files Browse the repository at this point in the history
  • Loading branch information
silwol committed Jun 9, 2022
1 parent 66c1c00 commit f1eda48
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/emscripten/src/exec.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use crate::varargs::VarArgs;
use crate::EmEnv;
use libc::c_char;
use libc::execvp as libc_execvp;
use std::ffi::CString;
use wasmer::WasmPtr;
Expand Down Expand Up @@ -27,7 +28,7 @@ pub fn execvp(ctx: &EmEnv, command_name_offset: u32, argv_offset: u32) -> i32 {
CString::new(vec).unwrap()
})
.collect();
let mut argv: Vec<*const i8> = arg_strings.iter().map(|s| s.as_ptr()).collect();
let mut argv: Vec<*const c_char> = arg_strings.iter().map(|s| s.as_ptr()).collect();

// push a nullptr on to the end of the args array
argv.push(std::ptr::null());
Expand Down

0 comments on commit f1eda48

Please sign in to comment.