Add socketpair

This commit is contained in:
Steven Fackler 2015-11-03 21:10:08 -08:00
parent 6d817ed05a
commit e6c00c2fd6
1 changed files with 4 additions and 0 deletions

View File

@ -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,