From fa51a29bf64b0616fb643d0ffb5da2791dab0065 Mon Sep 17 00:00:00 2001 From: Wolfgang Silbermayr Date: Thu, 9 Jun 2022 17:52:04 +0200 Subject: [PATCH] Fix build error on some archs by using c_char instead of i8 --- CHANGELOG.md | 1 + lib/emscripten/src/exec.rs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 259c9889c7e..33e8f406bd7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Looking for changes that affect our C API? See the [C API Changelog](lib/c-api/C ### Fixed - [#2942](https://github.com/wasmerio/wasmer/pull/2942) Fix clippy lints. +- [#2943](https://github.com/wasmerio/wasmer/pull/2943) Fix build error on some archs by using c_char instead of i8 ## 2.3.0 - 2022/06/06 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());