Skip to content

Commit f0bf46b

Browse files
authored
build: Fix compilation issues on macOS (#2696)
Closes #2695
1 parent 99259cb commit f0bf46b

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

src/async_impl/client.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,18 @@ impl ClientBuilder {
601601
proxies.clone(),
602602
user_agent(&config.headers),
603603
config.local_address,
604-
#[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))]
604+
#[cfg(any(
605+
target_os = "android",
606+
target_os = "fuchsia",
607+
target_os = "illumos",
608+
target_os = "ios",
609+
target_os = "linux",
610+
target_os = "macos",
611+
target_os = "solaris",
612+
target_os = "tvos",
613+
target_os = "visionos",
614+
target_os = "watchos",
615+
))]
605616
config.interface.as_deref(),
606617
config.nodelay,
607618
config.tls_info,

src/blocking/client.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,18 @@ impl ClientBuilder {
564564
/// .interface(interface)
565565
/// .build().unwrap();
566566
/// ```
567-
#[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))]
567+
#[cfg(any(
568+
target_os = "android",
569+
target_os = "fuchsia",
570+
target_os = "illumos",
571+
target_os = "ios",
572+
target_os = "linux",
573+
target_os = "macos",
574+
target_os = "solaris",
575+
target_os = "tvos",
576+
target_os = "visionos",
577+
target_os = "watchos",
578+
))]
568579
pub fn interface(self, interface: &str) -> ClientBuilder {
569580
self.with_inner(move |inner| inner.interface(interface))
570581
}

0 commit comments

Comments
 (0)