Skip to content

Commit

Permalink
Add conditional compilation to stuff not needed on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
faern committed Feb 18, 2018
1 parent 33a2eda commit 08f6eb4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mullvad-cli/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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
}
1 change: 1 addition & 0 deletions mullvad-daemon/src/bin/problem-report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions talpid-core/src/tunnel/openvpn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ mod errors {
pub use self::errors::*;


#[cfg(unix)]
lazy_static!{
static ref OPENVPN_DIE_TIMEOUT: Duration = Duration::from_secs(2);
}
Expand Down

0 comments on commit 08f6eb4

Please sign in to comment.