From d444f1bcf20b29d0ec69e30046c71d005a2b9d72 Mon Sep 17 00:00:00 2001 From: Jason King Date: Wed, 17 Jun 2020 01:11:05 +0000 Subject: illumos and Solaris support Co-authored-by: Dominik Hassler Co-authored-by: Joshua M. Clulow --- src/features.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/features.rs') diff --git a/src/features.rs b/src/features.rs index 6b1cff5d..bcda45d4 100644 --- a/src/features.rs +++ b/src/features.rs @@ -94,10 +94,19 @@ mod os { } } +#[cfg(any(target_os = "illumos"))] +mod os { + /// Check if the OS supports atomic close-on-exec for sockets + pub 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"))] + target_os = "redox", target_os = "fuchsia", + target_os = "solaris"))] mod os { /// Check if the OS supports atomic close-on-exec for sockets pub fn socket_atomic_cloexec() -> bool { -- cgit v1.2.3