Skip to content

Commit 693ff94

Browse files
committed
Fix non-android platforms
1 parent 1396839 commit 693ff94

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

talpid-types/src/net/mod.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use ipnetwork::{IpNetwork, Ipv4Network, Ipv6Network};
2+
#[cfg(target_os = "android")]
23
use jnix::FromJava;
34
use obfuscation::ObfuscatorConfig;
45
use serde::{Deserialize, Serialize};
@@ -565,8 +566,9 @@ pub fn all_of_the_internet() -> Vec<ipnetwork::IpNetwork> {
565566
///
566567
/// Information about the host's connectivity, such as the preesence of
567568
/// configured IPv4 and/or IPv6.
568-
#[derive(Debug, Clone, Copy, PartialEq, FromJava)]
569-
#[jnix(package = "net.mullvad.talpid.model")]
569+
#[derive(Debug, Clone, Copy, PartialEq)]
570+
#[cfg_attr(target_os = "android", derive(FromJava))]
571+
#[cfg_attr(target_os = "android", jnix(package = "net.mullvad.talpid.model"))]
570572
pub enum Connectivity {
571573
Status {
572574
/// Whether IPv4 connectivity seems to be available on the host.

0 commit comments

Comments
 (0)