c_char fix

The i8 is a u8 on raspberry pi 4 aarch64 linux, c_char takes care of this automatically.
This commit is contained in:
Anton-4 2023-06-30 18:05:39 +02:00
parent c4b0a2ec29
commit 7e86539e3d
No known key found for this signature in database
GPG key ID: 0971D718C0A9B937
2 changed files with 3 additions and 3 deletions

View file

@ -11,7 +11,7 @@ use roc_collections::all::MutMap;
use roc_error_macros::internal_error;
use serde::{Deserialize, Serialize};
use std::{
ffi::CStr,
ffi::{CStr, c_char},
io::{BufReader, BufWriter},
mem,
path::Path,
@ -499,7 +499,7 @@ pub(crate) fn preprocess_macho(
// std::ffi::CStr is actually not a char* under
// the hood (!) but rather an array, so to strip
// the trailing null bytes we have to use from_ptr.
let c_str = unsafe { CStr::from_ptr(str_bytes.as_ptr() as *const i8) };
let c_str = unsafe { CStr::from_ptr(str_bytes.as_ptr() as *const c_char) };
Path::new(c_str.to_str().unwrap())
} else {