From 351238c300838d39ca896eeb7d180a35cc12998f Mon Sep 17 00:00:00 2001 From: Xusheng Date: Fri, 2 Aug 2024 14:42:21 +0800 Subject: Fix arm64 Linux build by using std::os::raw::c_char rather than i8 to represent a C char --- rust/src/enterprise.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rust/src/enterprise.rs') 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(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(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, ) } -- cgit v1.3.1