Skip to content

Commit 836cda9

Browse files
authored
Auto merge of #394 - lemonrock:accept4, r=alexcrichton
Adding accept4 function accept4 is a version of accept that takes flags. It is more efficient for certain use cases, and has a more modern path inside the kernel.
2 parents a49950c + cf7f8f6 commit 836cda9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/unix/notbsd/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -843,6 +843,8 @@ extern {
843843
pub fn setns(fd: ::c_int, nstype: ::c_int) -> ::c_int;
844844
pub fn sem_timedwait(sem: *mut sem_t,
845845
abstime: *const ::timespec) -> ::c_int;
846+
pub fn accept4(fd: ::c_int, addr: *mut ::sockaddr, len: *mut ::socklen_t,
847+
flg: ::c_int) -> ::c_int;
846848
}
847849

848850
cfg_if! {

0 commit comments

Comments
 (0)