mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-10-01 01:26:08 -04:00
minor android fixes
This commit is contained in:
parent
40660c6b33
commit
0b587e8f04
@ -132,7 +132,9 @@ fn fix_android_emulator() {
|
||||
let target_arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap();
|
||||
if target_arch == "x86_64" && target_os == "android" {
|
||||
let missing_library = "clang_rt.builtins-x86_64-android";
|
||||
let android_home = env::var("ANDROID_HOME").expect("ANDROID_HOME not set");
|
||||
let android_home = env::var("ANDROID_HOME")
|
||||
.or(env::var("ANDROID_SDK_ROOT"))
|
||||
.expect("ANDROID_HOME or ANDROID_SDK_ROOT not set");
|
||||
let lib_path = glob(&format!(
|
||||
"{android_home}/ndk/25.1.8937393/**/lib{missing_library}.a"
|
||||
))
|
||||
|
@ -26,7 +26,7 @@ cfg_if! {
|
||||
use std::convert::TryInto;
|
||||
use std::ffi::CStr;
|
||||
use std::io;
|
||||
use std::os::raw::{c_char, c_int};
|
||||
use std::os::raw::c_int;
|
||||
use tools::*;
|
||||
|
||||
fn get_interface_name(index: u32) -> io::Result<String> {
|
||||
@ -37,6 +37,7 @@ fn get_interface_name(index: u32) -> io::Result<String> {
|
||||
bail_io_error_other!("if_indextoname returned null");
|
||||
}
|
||||
} else {
|
||||
use std::os::raw::c_char;
|
||||
if unsafe { if_indextoname(index, ifnamebuf.as_mut_ptr() as *mut c_char) }.is_null() {
|
||||
bail_io_error_other!("if_indextoname returned null");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user