Skip to content

Commit

Permalink
Merge #1654
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
bors[bot] and rtzoeller authored Feb 5, 2022
2 parents 2143ffe + 9dfd7f1 commit 9e8a54c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
(#[1636](https://github.com/nix-rust/nix/pull/1636))
- Added `fspacectl` on FreeBSD
(#[1640](https://github.com/nix-rust/nix/pull/1640))
- Added `accept4` on DragonFly, Emscripten, Fuchsia, Illumos, and NetBSD.
(#[1654](https://github.com/nix-rust/nix/pull/1654))

### Changed

Expand Down
5 changes: 5 additions & 0 deletions src/sys/socket/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1794,8 +1794,13 @@ pub fn accept(sockfd: RawFd) -> Result<RawFd> {
target_arch = "x86_64"
)
),
target_os = "dragonfly",
target_os = "emscripten",
target_os = "freebsd",
target_os = "fuchsia",
target_os = "illumos",
target_os = "linux",
target_os = "netbsd",
target_os = "openbsd"))]
pub fn accept4(sockfd: RawFd, flags: SockFlag) -> Result<RawFd> {
let res = unsafe { libc::accept4(sockfd, ptr::null_mut(), ptr::null_mut(), flags.bits()) };
Expand Down

0 comments on commit 9e8a54c

Please sign in to comment.