Skip to content

Commit

Permalink
Fix build error on some archs by using c_char instead of i8
Browse files Browse the repository at this point in the history
  • Loading branch information
silwol authored and epilys committed Jun 10, 2022
1 parent 8a481fc commit fa51a29
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
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 fa51a29

Please sign in to comment.