summaryrefslogtreecommitdiff
path: root/src/features.rs
diff options
context:
space:
mode:
authorCarl Lerche <me@carllerche.com>2014-08-21 01:13:57 -0700
committerCarl Lerche <me@carllerche.com>2014-08-21 01:13:57 -0700
commit2abaad5fbce61ec566a244c1d2eae2bc3aa5fd5b (patch)
tree3caf4bfb967e2d29eb33812ea2c2929066cdeb08 /src/features.rs
parentbbc24ea90eb9814db71a1297c4deb4eef91f9c2d (diff)
downloadnix-2abaad5fbce61ec566a244c1d2eae2bc3aa5fd5b.zip
Bind kqueue + misc cleanup
Diffstat (limited to 'src/features.rs')
-rw-r--r--src/features.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/features.rs b/src/features.rs
index 8b137891..db8bddf0 100644
--- a/src/features.rs
+++ b/src/features.rs
@@ -1 +1,16 @@
+pub use self::os::*;
+#[cfg(target_os = "linux")]
+mod os {
+ pub fn atomic_cloexec() -> bool {
+ true // TODO: Not on all kernel versions
+ }
+}
+
+#[cfg(target_os = "macos")]
+#[cfg(target_os = "ios")]
+mod os {
+ pub fn atomic_cloexec() -> bool {
+ false
+ }
+}