summaryrefslogtreecommitdiff
path: root/rust/src/enterprise.rs
diff options
context:
space:
mode:
authorXusheng <xusheng@vector35.com>2024-08-02 14:42:21 +0800
committerXusheng <xusheng@vector35.com>2024-08-02 14:42:21 +0800
commit351238c300838d39ca896eeb7d180a35cc12998f (patch)
tree0713e996da9002ce44503a569bd54334b14cb933 /rust/src/enterprise.rs
parentabbae639d8ba182e8b3cf2d5a9844a9b1f9844a1 (diff)
Fix arm64 Linux build by using std::os::raw::c_char rather than i8 to represent a C char
Diffstat (limited to 'rust/src/enterprise.rs')
-rw-r--r--rust/src/enterprise.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/rust/src/enterprise.rs b/rust/src/enterprise.rs
index 8065a7a3..232526dc 100644
--- a/rust/src/enterprise.rs
+++ b/rust/src/enterprise.rs
@@ -15,7 +15,7 @@ pub fn server_url() -> BnString {
pub fn set_server_url<S: BnStrCompatible>(url: S) -> Result<(), ()> {
let url = url.into_bytes_with_nul();
let result = unsafe {
- binaryninjacore_sys::BNSetEnterpriseServerUrl(url.as_ref().as_ptr() as *const i8)
+ binaryninjacore_sys::BNSetEnterpriseServerUrl(url.as_ref().as_ptr() as *const std::os::raw::c_char)
};
if result {
Ok(())
@@ -76,8 +76,8 @@ where
let password = password.into_bytes_with_nul();
unsafe {
binaryninjacore_sys::BNAuthenticateEnterpriseServerWithCredentials(
- username.as_ref().as_ptr() as *const i8,
- password.as_ref().as_ptr() as *const i8,
+ username.as_ref().as_ptr() as *const std::os::raw::c_char,
+ password.as_ref().as_ptr() as *const std::os::raw::c_char,
remember,
)
}
@@ -87,7 +87,7 @@ pub fn authenticate_server_with_method<S: BnStrCompatible>(method: S, remember:
let method = method.into_bytes_with_nul();
unsafe {
binaryninjacore_sys::BNAuthenticateEnterpriseServerWithMethod(
- method.as_ref().as_ptr() as *const i8,
+ method.as_ref().as_ptr() as *const std::os::raw::c_char,
remember,
)
}