diff options
| author | Linus Färnstrand <faern@faern.net> | 2022-01-11 10:06:05 +0100 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2022-01-11 13:24:02 +0100 |
| commit | f38cabd2e80d767c6d0e25af222b7c0355f18df3 (patch) | |
| tree | ee8759f96623da6cc7720415f9276c1c39033907 | |
| parent | 94df8f8311dd6d801ff4d6950164520cde14a212 (diff) | |
| download | mullvadvpn-f38cabd2e80d767c6d0e25af222b7c0355f18df3.tar.xz mullvadvpn-f38cabd2e80d767c6d0e25af222b7c0355f18df3.zip | |
Fix Android dependencies and imports
| -rw-r--r-- | Cargo.lock | 1 | ||||
| -rw-r--r-- | mullvad-daemon/Cargo.toml | 1 | ||||
| -rw-r--r-- | mullvad-daemon/src/migrations/mod.rs | 2 | ||||
| -rw-r--r-- | mullvad-daemon/src/migrations/v3.rs | 2 | ||||
| -rw-r--r-- | mullvad-daemon/src/migrations/v4.rs | 2 |
5 files changed, 7 insertions, 1 deletions
diff --git a/Cargo.lock b/Cargo.lock index a3fdecbf56..0203e5b11c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1333,6 +1333,7 @@ dependencies = [ "fern", "futures", "ipnetwork", + "jnix", "lazy_static", "libc", "log", diff --git a/mullvad-daemon/Cargo.toml b/mullvad-daemon/Cargo.toml index e9c3d75839..b2df8ce051 100644 --- a/mullvad-daemon/Cargo.toml +++ b/mullvad-daemon/Cargo.toml @@ -41,6 +41,7 @@ mullvad-management-interface = { path = "../mullvad-management-interface" } [target.'cfg(target_os="android")'.dependencies] android_logger = "0.8" +jnix = { version = "0.4", features = ["derive"] } [target.'cfg(unix)'.dependencies] nix = "0.22.2" diff --git a/mullvad-daemon/src/migrations/mod.rs b/mullvad-daemon/src/migrations/mod.rs index 04d23e457d..3ba962aaea 100644 --- a/mullvad-daemon/src/migrations/mod.rs +++ b/mullvad-daemon/src/migrations/mod.rs @@ -8,7 +8,7 @@ //! Migration modules may NOT import and use structs that may //! change. Because then a later change to the current code can break //! old migrations. The only items a settings migration module may import -//! are anything from `std` plus the following: +//! are anything from `std`, `jnix` and the following: //! //! ```ignore //! use super::{Error, Result}; diff --git a/mullvad-daemon/src/migrations/v3.rs b/mullvad-daemon/src/migrations/v3.rs index 6baa255538..d4c94443ff 100644 --- a/mullvad-daemon/src/migrations/v3.rs +++ b/mullvad-daemon/src/migrations/v3.rs @@ -1,4 +1,6 @@ use super::{Error, Result}; +#[cfg(target_os = "android")] +use jnix::IntoJava; use mullvad_types::settings::SettingsVersion; use std::net::IpAddr; diff --git a/mullvad-daemon/src/migrations/v4.rs b/mullvad-daemon/src/migrations/v4.rs index f6f6a9e0de..4a27b352fb 100644 --- a/mullvad-daemon/src/migrations/v4.rs +++ b/mullvad-daemon/src/migrations/v4.rs @@ -1,4 +1,6 @@ use super::{Error, Result}; +#[cfg(target_os = "android")] +use jnix::IntoJava; use mullvad_types::{relay_constraints::Constraint, settings::SettingsVersion}; // ====================================================== |
