diff options
author | Alan Somers <asomers@gmail.com> | 2021-10-16 08:47:31 -0600 |
---|---|---|
committer | Alan Somers <asomers@gmail.com> | 2021-10-16 08:47:31 -0600 |
commit | 658458c8df930585fd235c6cfe00c9c49508d4a9 (patch) | |
tree | 26322428f7cfaafbdaa78e69150f97352afe99fc | |
parent | da49e4f988d7a7fcbb7b98eddd52637f3f3e68e1 (diff) | |
download | nix-658458c8df930585fd235c6cfe00c9c49508d4a9.zip |
Update features::socket_atomic_cloexec
Several platforms have long supported SOCK_OCLOEXEC. Mark them as
supporting this feature.
-rw-r--r-- | src/features.rs | 16 |
1 files 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 |