Closed
Description
Currently Rust stdlib on macOS requires every executable to link to libresolv.dylib
. This is probably unnecessary and happens only because res_init_if_glibc_before_2_26
is called on all #[cfg(unix)]
platforms.
On macOS -lresolv
is rarely used, so Rust static libraries cause linker errors in most C programs due to _res_9_init
missing.
Can the res_init_if_glibc_before_2_26
hack be limited to #[cfg(linux)]
or something with not(target_os = "macos")
?