Skip to content

Commit 863fb88

Browse files
committed
Auto merge of rust-lang#546 - alexander255:master, r=alexcrichton
Add support for the `accept4` system call for FreeBSD* & NetBSD* As outlined in rust-lang#540. However since support for this system call seems to be committed, but not yet released in NetBSD & BitRig (is BitRig actually still be developed at all, btw?), I'm not sure whether it wouldn't be a better idea to only add OpenBSD support instead? What's the official policy on this?
2 parents 05a2d19 + 23d4059 commit 863fb88

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)