Skip to content

Commit 57f8e62

Browse files
bors[bot]rtzoeller
andauthored
Merge #1654
1654: Add accept4 on DragonFly, Emscripten, Fuchsia, Illumos, and NetBSD. r=rtzoeller a=rtzoeller Expand accept4 support to more platforms. Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
2 parents 2143ffe + 9269056 commit 57f8e62

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Diff for: CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
3939
(#[1636](https://github.com/nix-rust/nix/pull/1636))
4040
- Added `fspacectl` on FreeBSD
4141
(#[1640](https://github.com/nix-rust/nix/pull/1640))
42+
- Added `accept4` on DragonFly, Emscripten, Fuchsia, Illumos, and NetBSD.
43+
(#[1654](https://github.com/nix-rust/nix/pull/1654))
4244

4345
### Changed
4446

Diff for: src/sys/socket/mod.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1794,8 +1794,13 @@ pub fn accept(sockfd: RawFd) -> Result<RawFd> {
17941794
target_arch = "x86_64"
17951795
)
17961796
),
1797+
target_os = "dragonfly",
1798+
target_os = "emscripten",
17971799
target_os = "freebsd",
1800+
target_os = "fuchsia",
1801+
target_os = "illumos",
17981802
target_os = "linux",
1803+
target_os = "netbsd",
17991804
target_os = "openbsd"))]
18001805
pub fn accept4(sockfd: RawFd, flags: SockFlag) -> Result<RawFd> {
18011806
let res = unsafe { libc::accept4(sockfd, ptr::null_mut(), ptr::null_mut(), flags.bits()) };

0 commit comments

Comments
 (0)