diff --git a/src/unix/mod.rs b/src/unix/mod.rs index fb028971a585e..636b5d3c98ae7 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -132,6 +132,10 @@ extern { pub fn setsockopt(socket: ::c_int, level: ::c_int, name: ::c_int, value: *const ::c_void, option_len: socklen_t) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "socketpair$UNIX2003")] + pub fn socketpair(domain: ::c_int, type_: ::c_int, protocol: ::c_int, + socket_vector: *mut ::c_int) -> ::c_int; #[cfg_attr(all(target_os = "macos", target_arch = "x86"), link_name = "sendto$UNIX2003")] pub fn sendto(socket: ::c_int, buf: *const ::c_void, len: ::size_t,