From e6c00c2fd6731fc67b4b74c8fa6d3bdfecf34ff2 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Tue, 3 Nov 2015 21:10:08 -0800 Subject: [PATCH] Add socketpair --- src/unix/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) 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,