Skip to content

Commit 8fdf28e

Browse files
authored
Merge pull request #1705 from tormol/accept4all
Add accept4() for NetBSD, Illumos and Solaris
2 parents 55a5eb8 + e3bbec2 commit 8fdf28e

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

src/unix/bsd/netbsdlike/mod.rs

+6
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,12 @@ extern "C" {
632632
) -> ::c_int;
633633

634634
pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int;
635+
pub fn accept4(
636+
s: ::c_int,
637+
addr: *mut ::sockaddr,
638+
addrlen: *mut ::socklen_t,
639+
flags: ::c_int,
640+
) -> ::c_int;
635641
pub fn mincore(
636642
addr: *mut ::c_void,
637643
len: ::size_t,

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

-6
Original file line numberDiff line numberDiff line change
@@ -1393,12 +1393,6 @@ extern "C" {
13931393
tp: *const ::timeval,
13941394
tz: *const ::timezone,
13951395
) -> ::c_int;
1396-
pub fn accept4(
1397-
s: ::c_int,
1398-
addr: *mut ::sockaddr,
1399-
addrlen: *mut ::socklen_t,
1400-
flags: ::c_int,
1401-
) -> ::c_int;
14021396
pub fn execvpe(
14031397
file: *const ::c_char,
14041398
argv: *const *const ::c_char,

src/unix/solarish/mod.rs

+6
Original file line numberDiff line numberDiff line change
@@ -2347,6 +2347,12 @@ extern "C" {
23472347
msg: *mut ::msghdr,
23482348
flags: ::c_int,
23492349
) -> ::ssize_t;
2350+
pub fn accept4(
2351+
fd: ::c_int,
2352+
address: *mut sockaddr,
2353+
address_len: *mut socklen_t,
2354+
flags: ::c_int
2355+
) -> ::c_int;
23502356

23512357
pub fn mq_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::mqd_t;
23522358
pub fn mq_close(mqd: ::mqd_t) -> ::c_int;

0 commit comments

Comments
 (0)