summaryrefslogtreecommitdiff
path: root/src/features.rs
diff options
context:
space:
mode:
authorBryant Mairs <bryantmairs@google.com>2018-01-14 11:18:40 -0800
committerBryant Mairs <bryantmairs@google.com>2018-01-28 17:39:12 -0800
commit29eca60c18cab1c02479b72cc3215a7c9cd5921f (patch)
treef2888ba6508af11861d013ea07b93b1812c3038d /src/features.rs
parentb2c5a9586332052bf842babb109097e2b7b774f2 (diff)
downloadnix-29eca60c18cab1c02479b72cc3215a7c9cd5921f.zip
Require docs for features and ifaddrs module
Diffstat (limited to 'src/features.rs')
-rw-r--r--src/features.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/features.rs b/src/features.rs
index 1448fdd0..7797aa46 100644
--- a/src/features.rs
+++ b/src/features.rs
@@ -1,3 +1,4 @@
+//! Feature tests for OS functionality
pub use self::os::*;
#[cfg(any(target_os = "linux", target_os = "android"))]
@@ -82,6 +83,7 @@ mod os {
}
}
+ /// Check if the OS supports atomic close-on-exec for sockets
pub fn socket_atomic_cloexec() -> bool {
kernel_version() >= VERS_2_6_27
}
@@ -94,6 +96,7 @@ mod os {
#[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "ios", target_os = "openbsd", target_os = "netbsd"))]
mod os {
+ /// Check if the OS supports atomic close-on-exec for sockets
pub fn socket_atomic_cloexec() -> bool {
false
}