From 2618f7ae04bb458f53fc8fe4c40b54a9377ce0bb Mon Sep 17 00:00:00 2001 From: Thom Chiovoloni Date: Thu, 6 Oct 2022 20:35:58 -0700 Subject: [PATCH] Don't needless link to `libresolv` on Darwin in libstd --- library/std/src/sys/unix/mod.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/library/std/src/sys/unix/mod.rs b/library/std/src/sys/unix/mod.rs index c84e292eac152..c84e9e0d43b60 100644 --- a/library/std/src/sys/unix/mod.rs +++ b/library/std/src/sys/unix/mod.rs @@ -352,16 +352,12 @@ cfg_if::cfg_if! { extern "C" {} } else if #[cfg(target_os = "macos")] { #[link(name = "System")] - // res_init and friends require -lresolv on macOS/iOS. - // See #41582 and https://blog.achernya.com/2013/03/os-x-has-silly-libsystem.html - #[link(name = "resolv")] extern "C" {} } else if #[cfg(any(target_os = "ios", target_os = "watchos"))] { #[link(name = "System")] #[link(name = "objc")] #[link(name = "Security", kind = "framework")] #[link(name = "Foundation", kind = "framework")] - #[link(name = "resolv")] extern "C" {} } else if #[cfg(target_os = "fuchsia")] { #[link(name = "zircon")]