Skip to content

Commit

Permalink
Update features::socket_atomic_cloexec
Browse files Browse the repository at this point in the history
Several platforms have long supported SOCK_OCLOEXEC.  Mark them as
supporting this feature.
  • Loading branch information
asomers committed Oct 16, 2021
1 parent da49e4f commit 658458c
Showing 1 changed file with 11 additions and 5 deletions.
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

0 comments on commit 658458c

Please sign in to comment.