From f1eda483512dd76738d76aaabb6446e261a3688f Mon Sep 17 00:00:00 2001 From: Wolfgang Silbermayr Date: Thu, 9 Jun 2022 17:52:04 +0200 Subject: [PATCH] Fix failing build on some architectures by using c_char instead of i8 --- lib/emscripten/src/exec.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/emscripten/src/exec.rs b/lib/emscripten/src/exec.rs index 12afe965963..867a3d3115f 100644 --- a/lib/emscripten/src/exec.rs +++ b/lib/emscripten/src/exec.rs @@ -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; @@ -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());