From 658458c8df930585fd235c6cfe00c9c49508d4a9 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Sat, 16 Oct 2021 08:47:31 -0600 Subject: Update features::socket_atomic_cloexec Several platforms have long supported SOCK_OCLOEXEC. Mark them as supporting this feature. --- src/features.rs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/features.rs b/src/features.rs index 38eb3ea0..ed80fd71 100644 --- a/src/features.rs +++ b/src/features.rs @@ -94,7 +94,14 @@ 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 { @@ -102,10 +109,9 @@ mod os { } } -#[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 -- cgit v1.2.3