Skip to content

Commit 3bb2fef

Browse files
committed
Merge pull request #35 from sfackler/socketpair
Add socketpair
2 parents 6d817ed + e6c00c2 commit 3bb2fef

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/unix/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ extern {
132132
pub fn setsockopt(socket: ::c_int, level: ::c_int, name: ::c_int,
133133
value: *const ::c_void,
134134
option_len: socklen_t) -> ::c_int;
135+
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
136+
link_name = "socketpair$UNIX2003")]
137+
pub fn socketpair(domain: ::c_int, type_: ::c_int, protocol: ::c_int,
138+
socket_vector: *mut ::c_int) -> ::c_int;
135139
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
136140
link_name = "sendto$UNIX2003")]
137141
pub fn sendto(socket: ::c_int, buf: *const ::c_void, len: ::size_t,

0 commit comments

Comments
 (0)