summaryrefslogtreecommitdiff
path: root/rust
diff options
context:
space:
mode:
authorRusty Wagner <rusty.wagner@gmail.com>2024-05-20 18:24:49 -0400
committerRusty Wagner <rusty.wagner@gmail.com>2024-05-20 18:24:49 -0400
commit331d226464fb043a12eada4f4c752d8ef20c5efb (patch)
treee38bb4262ac43194e197e5716e058c5766079cb3 /rust
parent27bc08fa90d4381b4fd5d896dda991824504b0fd (diff)
Fix ARM64 Linux build
Diffstat (limited to 'rust')
-rw-r--r--rust/src/function.rs6
-rw-r--r--rust/src/mlil/function.rs7
2 files changed, 7 insertions, 6 deletions
diff --git a/rust/src/function.rs b/rust/src/function.rs
index 78b7da9f..48f02205 100644
--- a/rust/src/function.rs
+++ b/rust/src/function.rs
@@ -40,7 +40,7 @@ pub use binaryninjacore_sys::BNFunctionAnalysisSkipOverride as FunctionAnalysisS
pub use binaryninjacore_sys::BNFunctionUpdateType as FunctionUpdateType;
use std::{fmt, mem};
-use std::{hash::Hash, ops::Range};
+use std::{ffi::c_char, hash::Hash, ops::Range};
pub struct Location {
pub arch: Option<CoreArchitecture>,
@@ -1499,7 +1499,7 @@ impl Function {
let arch = arch.unwrap_or_else(|| self.arch());
let enum_display_typeid = enum_display_typeid.map(BnStrCompatible::into_bytes_with_nul);
let enum_display_typeid_ptr = enum_display_typeid
- .map(|x| x.as_ref().as_ptr() as *const i8)
+ .map(|x| x.as_ref().as_ptr() as *const c_char)
.unwrap_or(core::ptr::null());
unsafe {
BNSetIntegerConstantDisplayType(
@@ -1944,7 +1944,7 @@ impl Function {
.iter()
.position(|(alias, _value)| *alias == name)
{
- let name = DEBUG_REPORT_ALIAS[alias_idx].1.as_ptr() as *const i8;
+ let name = DEBUG_REPORT_ALIAS[alias_idx].1.as_ptr() as *const c_char;
unsafe { BNRequestFunctionDebugReport(self.handle, name) }
} else {
let name = std::ffi::CString::new(name.to_string()).unwrap();
diff --git a/rust/src/mlil/function.rs b/rust/src/mlil/function.rs
index e0856b93..3a3ce5e8 100644
--- a/rust/src/mlil/function.rs
+++ b/rust/src/mlil/function.rs
@@ -1,4 +1,5 @@
use core::hash::{Hash, Hasher};
+use std::ffi::c_char;
use binaryninjacore_sys::*;
@@ -127,7 +128,7 @@ impl MediumLevelILFunction {
self.get_function().handle,
offset,
&mut raw_var_type,
- name.as_ref().as_ptr() as *const i8,
+ name.as_ref().as_ptr() as *const c_char,
)
}
}
@@ -270,7 +271,7 @@ impl MediumLevelILFunction {
self.get_function().handle,
offset,
&mut var_type,
- name_c_str.as_ptr() as *const i8,
+ name_c_str.as_ptr() as *const c_char,
)
}
}
@@ -295,7 +296,7 @@ impl MediumLevelILFunction {
self.get_function().handle,
&var.raw(),
&mut var_type,
- name_c_str.as_ptr() as *const i8,
+ name_c_str.as_ptr() as *const c_char,
ignore_disjoint_uses,
)
}