diff --git a/CHANGELOG.md b/CHANGELOG.md index 39bceab7b0..7433db1342 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/sys/socket/mod.rs b/src/sys/socket/mod.rs index 42a032c933..54327951ed 100644 --- a/src/sys/socket/mod.rs +++ b/src/sys/socket/mod.rs @@ -1794,8 +1794,13 @@ pub fn accept(sockfd: RawFd) -> Result { 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 { let res = unsafe { libc::accept4(sockfd, ptr::null_mut(), ptr::null_mut(), flags.bits()) };