Skip to content

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/unix/mod.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,13 @@ extern {
694694
res: *mut *mut addrinfo) -> ::c_int;
695695
pub fn freeaddrinfo(res: *mut addrinfo);
696696
pub fn gai_strerror(errcode: ::c_int) -> *const ::c_char;
697-
#[link_name = "__res_init"]
697+
#[cfg_attr(all(unix,
698+
not(target_os = "macos"),
699+
not(target_os = "solaris"),
700+
not(target_env = "musl")
701+
),
702+
link_name = "__res_init")]
703+
#[cfg_attr(target_os = "macos", link_name = "res_9_init")]
698704
pub fn res_init() -> ::c_int;
699705

700706
#[cfg_attr(target_os = "netbsd", link_name = "__gmtime_r50")]

0 commit comments

Comments
 (0)