fix linker c_char mismatched types build error

This commit is contained in:
SylvanSign 2022-03-25 21:52:07 -04:00
parent ab98c22b73
commit 5aa2a1eae6
No known key found for this signature in database
GPG key ID: 9E82494906F4F1E4

View file

@ -673,7 +673,7 @@ fn preprocess_impl(
)
.unwrap(),
) as usize;
let c_buf: *const c_char = dynstr_data[dynstr_off..].as_ptr() as *const i8;
let c_buf: *const c_char = dynstr_data[dynstr_off..].as_ptr() as *const c_char;
let c_str = unsafe { CStr::from_ptr(c_buf) }.to_str().unwrap();
if Path::new(c_str).file_name().unwrap().to_str().unwrap() == shared_lib_name {
shared_lib_index = Some(dyn_lib_index);