summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRyan Zoeller <rtzoeller@rtzoeller.com>2022-01-23 19:04:17 -0600
committerRyan Zoeller <rtzoeller@rtzoeller.com>2022-02-04 19:46:25 -0600
commit9269056e8e6543ae957a32141e33fd425e9e94d2 (patch)
treec0fda4050b69288d46ed39fbcbe9ac26fa4e4d87 /src
parent2143ffe90dbe6821f59d8a775853bcc4cba4dcca (diff)
downloadnix-9269056e8e6543ae957a32141e33fd425e9e94d2.zip
Add accept4 on supported platforms
Diffstat (limited to 'src')
-rw-r--r--src/sys/socket/mod.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sys/socket/mod.rs b/src/sys/socket/mod.rs
index 42a032c9..54327951 100644
--- a/src/sys/socket/mod.rs
+++ b/src/sys/socket/mod.rs
@@ -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()) };