Avoid special-casing linking with resolv
diff --git a/src/unix/mod.rs b/src/unix/mod.rs
index 2ef85f1..a235d6a 100644
--- a/src/unix/mod.rs
+++ b/src/unix/mod.rs
@@ -206,19 +206,9 @@
cfg_if! {
if #[cfg(dox)] {
// on dox builds don't pull in anything
- } else if #[cfg(all(not(stdbuild),
- feature = "use_std",
- not(any(target_os = "macos",
- target_os = "ios")
- )))] {
+ } else if #[cfg(all(not(stdbuild), feature = "use_std"))] {
// cargo build, don't pull in anything extra as the libstd dep
// already pulls in all libs.
- } else if #[cfg(all(not(stdbuild), feature = "use_std"))] {
- // except on macOS and iOS, where we must link with lib resolv
- // for res_init, despite libsystem_info including it:
- // http://blog.achernya.com/2013/03/os-x-has-silly-libsystem.html
- #[link(name = "resolv")]
- extern {}
} else if #[cfg(any(all(target_env = "musl", not(target_arch = "mips"))))] {
#[link(name = "c", kind = "static", cfg(target_feature = "crt-static"))]
#[link(name = "c", cfg(not(target_feature = "crt-static")))]
@@ -233,12 +223,8 @@
#[link(name = "m")]
extern {}
} else if #[cfg(any(target_os = "macos",
- target_os = "ios"))] {
- #[link(name = "c")]
- #[link(name = "m")]
- #[link(name = "resolv")]
- extern {}
- } else if #[cfg(any(target_os = "android",
+ target_os = "ios",
+ target_os = "android",
target_os = "openbsd",
target_os = "bitrig"))] {
#[link(name = "c")]