diff --git a/mullvad-cli/src/rpc.rs b/mullvad-cli/src/rpc.rs index 5e14cdf19527..00c3a53b488b 100644 --- a/mullvad-cli/src/rpc.rs +++ b/mullvad-cli/src/rpc.rs @@ -3,7 +3,9 @@ use serde; use std::fs::{File, Metadata}; use std::io::{self, BufRead, BufReader}; -use std::path::{Path, PathBuf}; +#[cfg(unix)] +use std::path::Path; +use std::path::PathBuf; use talpid_ipc::WsIpcClient; @@ -73,7 +75,7 @@ fn is_rpc_file_trusted(metadata: Metadata) -> bool { } #[cfg(windows)] -fn is_rpc_file_trusted(metadata: Metadata) -> bool { +fn is_rpc_file_trusted(_metadata: Metadata) -> bool { // TODO: Check permissions correctly true } diff --git a/mullvad-daemon/src/bin/problem-report.rs b/mullvad-daemon/src/bin/problem-report.rs index 51c10ca20d17..5ae9c27351be 100644 --- a/mullvad-daemon/src/bin/problem-report.rs +++ b/mullvad-daemon/src/bin/problem-report.rs @@ -365,6 +365,7 @@ fn os_version() -> String { } /// Helper for getting stdout of some command as a String. Ignores the exit code of the command. +#[cfg(any(target_os = "linux", target_os = "macos"))] fn command_stdout_lossy(cmd: &str, args: &[&str]) -> Option { Command::new(cmd) .args(args) diff --git a/talpid-core/src/tunnel/openvpn.rs b/talpid-core/src/tunnel/openvpn.rs index f52240a3af39..ded4ff2d34c8 100644 --- a/talpid-core/src/tunnel/openvpn.rs +++ b/talpid-core/src/tunnel/openvpn.rs @@ -31,6 +31,7 @@ mod errors { pub use self::errors::*; +#[cfg(unix)] lazy_static!{ static ref OPENVPN_DIE_TIMEOUT: Duration = Duration::from_secs(2); }