Skip to content

Commit 658458c

Browse files
committed
Update features::socket_atomic_cloexec
Several platforms have long supported SOCK_OCLOEXEC. Mark them as supporting this feature.
1 parent da49e4f commit 658458c

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/features.rs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,18 +94,24 @@ mod os {
9494
}
9595
}
9696

97-
#[cfg(any(target_os = "illumos"))]
97+
#[cfg(any(
98+
target_os = "dragonfly", // Since ???
99+
target_os = "freebsd", // Since 10.0
100+
target_os = "illumos", // Since ???
101+
target_os = "netbsd", // Since 6.0
102+
target_os = "openbsd", // Since 5.7
103+
target_os = "redox", // Since 1-july-2020
104+
))]
98105
mod os {
99106
/// Check if the OS supports atomic close-on-exec for sockets
100107
pub const fn socket_atomic_cloexec() -> bool {
101108
true
102109
}
103110
}
104111

105-
#[cfg(any(target_os = "macos", target_os = "freebsd",
106-
target_os = "dragonfly", target_os = "ios",
107-
target_os = "openbsd", target_os = "netbsd",
108-
target_os = "redox", target_os = "fuchsia",
112+
#[cfg(any(target_os = "macos",
113+
target_os = "ios",
114+
target_os = "fuchsia",
109115
target_os = "solaris"))]
110116
mod os {
111117
/// Check if the OS supports atomic close-on-exec for sockets

0 commit comments

Comments
 (0)