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>
This commit is contained in:
bors[bot] 2022-02-06 17:10:45 +00:00 committed by GitHub
commit 0bd56d96e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -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

View File

@ -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()) };