Skip to content

Commit 460ea57

Browse files
committed
Change cfg guards to inclide macos (only exclude android)
1 parent 4db260d commit 460ea57

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

talpid-core/src/tunnel/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,9 @@ impl TunnelMonitor {
164164
{
165165
let default_mtu = DEFAULT_MTU;
166166

167-
#[cfg(any(target_os = "linux", target_os = "windows"))]
168167
// Detects the MTU of the device and sets the default tunnel MTU to that minus headers and
169168
// the safety margin
169+
#[cfg(any(target_os = "linux", target_os = "windows"))]
170170
let default_mtu = args
171171
.runtime
172172
.block_on(
@@ -176,14 +176,14 @@ impl TunnelMonitor {
176176
.map(|mtu| Self::clamp_mtu(params, mtu))
177177
.unwrap_or(default_mtu);
178178

179-
#[cfg(any(target_os = "linux", windows))]
179+
#[cfg(not(target_os = "android"))]
180180
let detect_mtu = params.options.mtu.is_none();
181181

182182
let config = talpid_wireguard::config::Config::from_parameters(params, default_mtu)?;
183183
let monitor = talpid_wireguard::WireguardMonitor::start(
184184
config,
185185
params.options.quantum_resistant,
186-
#[cfg(any(target_os = "linux", windows))]
186+
#[cfg(not(target_os = "android"))]
187187
detect_mtu,
188188
log.as_deref(),
189189
args,

talpid-wireguard/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ impl WireguardMonitor {
269269
>(
270270
mut config: Config,
271271
psk_negotiation: bool,
272-
#[cfg(any(target_os = "linux", windows))] detect_mtu: bool,
272+
#[cfg(not(target_os = "android"))] detect_mtu: bool,
273273
log_path: Option<&Path>,
274274
args: TunnelArgs<'_, F>,
275275
) -> Result<WireguardMonitor> {
@@ -389,7 +389,7 @@ impl WireguardMonitor {
389389
.await?;
390390
}
391391

392-
#[cfg(any(target_os = "linux", windows))]
392+
#[cfg(not(target_os = "android"))]
393393
if detect_mtu {
394394
let iface_name_clone = iface_name.clone();
395395
tokio::task::spawn(async move {

0 commit comments

Comments
 (0)