Skip to content

Update features::socket_atomic_cloexec #1565

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions src/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,24 @@ mod os {
}
}

#[cfg(any(target_os = "illumos"))]
#[cfg(any(
target_os = "dragonfly", // Since ???
target_os = "freebsd", // Since 10.0
target_os = "illumos", // Since ???
target_os = "netbsd", // Since 6.0
target_os = "openbsd", // Since 5.7
target_os = "redox", // Since 1-july-2020
))]
mod os {
/// Check if the OS supports atomic close-on-exec for sockets
pub const fn socket_atomic_cloexec() -> bool {
true
}
}

#[cfg(any(target_os = "macos", target_os = "freebsd",
target_os = "dragonfly", target_os = "ios",
target_os = "openbsd", target_os = "netbsd",
target_os = "redox", target_os = "fuchsia",
#[cfg(any(target_os = "macos",
target_os = "ios",
target_os = "fuchsia",
target_os = "solaris"))]
mod os {
/// Check if the OS supports atomic close-on-exec for sockets
Expand Down