From 8a27c55db2d065f53ccce002c1b15c69cc9b8010 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Sat, 11 Mar 2023 01:34:33 +0800 Subject: [PATCH] remove sys-info crate for mobile because which depends on libunwind, it is not in ndk r22b --- libs/hbb_common/Cargo.toml | 4 ++-- src/ipc.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/hbb_common/Cargo.toml b/libs/hbb_common/Cargo.toml index 2ccaa92e9..ed9ec73be 100644 --- a/libs/hbb_common/Cargo.toml +++ b/libs/hbb_common/Cargo.toml @@ -34,11 +34,11 @@ tokio-socks = { git = "https://github.com/open-trade/tokio-socks" } chrono = "0.4" backtrace = "0.3" libc = "0.2" -sysinfo = "0.28" [target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies] mac_address = "1.1" machine-uid = "0.2" +sysinfo = "0.28" [features] quic = [] @@ -55,4 +55,4 @@ osascript = "0.3.0" [dev-dependencies] toml = "0.7" -serde_json = "1.0" \ No newline at end of file +serde_json = "1.0" diff --git a/src/ipc.rs b/src/ipc.rs index 22cf388f4..5f415c6e8 100644 --- a/src/ipc.rs +++ b/src/ipc.rs @@ -251,7 +251,7 @@ pub async fn start(postfix: &str) -> ResultType<()> { pub async fn new_listener(postfix: &str) -> ResultType { let path = Config::ipc_path(postfix); - #[cfg(not(windows))] + #[cfg(not(any(windows, target_os = "android", target_os = "ios")))] check_pid(postfix).await; let mut endpoint = Endpoint::new(path.clone()); match SecurityAttributes::allow_everyone_create() { @@ -541,7 +541,7 @@ fn get_pid_file(postfix: &str) -> String { format!("{}.pid", path) } -#[cfg(not(windows))] +#[cfg(not(any(windows, target_os = "android", target_os = "ios")))] async fn check_pid(postfix: &str) { let pid_file = get_pid_file(postfix); if let Ok(mut file) = File::open(&pid_file) {