diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2018-02-17 00:20:22 +0100 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2018-02-18 23:39:04 +0100 |
| commit | 08f6eb436f03ba0c68d2a1e460e6ca42048124d6 (patch) | |
| tree | 96c749044092a70d3c6d5b2a9b616f4c74f08fa9 | |
| parent | 33a2edadad1c3b5fe7ea667f6b7ad4dd97c69ec3 (diff) | |
| download | mullvadvpn-08f6eb436f03ba0c68d2a1e460e6ca42048124d6.tar.xz mullvadvpn-08f6eb436f03ba0c68d2a1e460e6ca42048124d6.zip | |
Add conditional compilation to stuff not needed on Windows
| -rw-r--r-- | mullvad-cli/src/rpc.rs | 6 | ||||
| -rw-r--r-- | mullvad-daemon/src/bin/problem-report.rs | 1 | ||||
| -rw-r--r-- | talpid-core/src/tunnel/openvpn.rs | 1 |
3 files changed, 6 insertions, 2 deletions
diff --git a/mullvad-cli/src/rpc.rs b/mullvad-cli/src/rpc.rs index 5e14cdf195..00c3a53b48 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 51c10ca20d..5ae9c27351 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<String> { Command::new(cmd) .args(args) diff --git a/talpid-core/src/tunnel/openvpn.rs b/talpid-core/src/tunnel/openvpn.rs index f52240a3af..ded4ff2d34 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); } |
