mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 00:01:16 +00:00
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:
parent
c4b0a2ec29
commit
7e86539e3d
2 changed files with 3 additions and 3 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue