Skip to content

Commit 23d4059

Browse files
committed
Add support for the accept4 system call for FreeBSD* & NetBSD*
1 parent 05a2d19 commit 23d4059

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -980,6 +980,8 @@ extern {
980980
base: ::locale_t) -> ::locale_t;
981981
pub fn uselocale(loc: ::locale_t) -> ::locale_t;
982982
pub fn querylocale(mask: ::c_int, loc: ::locale_t) -> *const ::c_char;
983+
pub fn accept4(s: ::c_int, addr: *mut ::sockaddr,
984+
addrlen: *mut ::socklen_t, flags: ::c_int) -> ::c_int;
983985
pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char);
984986
pub fn pthread_attr_get_np(tid: ::pthread_t,
985987
attr: *mut ::pthread_attr_t) -> ::c_int;

src/unix/bsd/netbsdlike/openbsdlike/openbsd.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,8 @@ s! {
2626
pub int_n_sign_posn: ::c_char,
2727
}
2828
}
29+
30+
extern {
31+
pub fn accept4(s: ::c_int, addr: *mut ::sockaddr,
32+
addrlen: *mut ::socklen_t, flags: ::c_int) -> ::c_int;
33+
}

0 commit comments

Comments
 (0)