Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build error on some archs by using c_char instead of i8 #2943

Merged
merged 1 commit into from
Jun 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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