diff options
| author | Xusheng <xusheng@vector35.com> | 2024-08-02 14:42:21 +0800 |
|---|---|---|
| committer | Xusheng <xusheng@vector35.com> | 2024-08-02 14:42:21 +0800 |
| commit | 351238c300838d39ca896eeb7d180a35cc12998f (patch) | |
| tree | 0713e996da9002ce44503a569bd54334b14cb933 /rust/src | |
| parent | abbae639d8ba182e8b3cf2d5a9844a9b1f9844a1 (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')
| -rw-r--r-- | rust/src/enterprise.rs | 8 | ||||
| -rw-r--r-- | rust/src/lib.rs | 4 |
2 files changed, 6 insertions, 6 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, ) } diff --git a/rust/src/lib.rs b/rust/src/lib.rs index baac888b..bd46611d 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -476,7 +476,7 @@ pub fn license_count() -> i32 { pub fn set_license<S: string::BnStrCompatible>(license: S) { let license = license.into_bytes_with_nul(); let license_slice = license.as_ref(); - unsafe { binaryninjacore_sys::BNSetLicense(license_slice.as_ptr() as *const i8) } + unsafe { binaryninjacore_sys::BNSetLicense(license_slice.as_ptr() as *const std::os::raw::c_char) } } pub fn product() -> string::BnString { @@ -501,7 +501,7 @@ pub fn is_ui_enabled() -> bool { pub fn is_database<S: string::BnStrCompatible>(filename: S) -> bool { let filename = filename.into_bytes_with_nul(); let filename_slice = filename.as_ref(); - unsafe { binaryninjacore_sys::BNIsDatabase(filename_slice.as_ptr() as *const i8) } + unsafe { binaryninjacore_sys::BNIsDatabase(filename_slice.as_ptr() as *const std::os::raw::c_char) } } pub fn plugin_abi_version() -> u32 { |
