[fuchsia] Config changes to build on Fuchsia
This patch disables various Unix-specific platform features that are
not enabled on Fuchsia. It also updates the mio version to 0.6.10,
which is the first release that supports Fuchsia.
diff --git a/Cargo.toml b/Cargo.toml
index afc5192..dbc790d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -19,7 +19,7 @@
[dependencies]
bytes = "0.4"
log = "0.3"
-mio = "0.6.9"
+mio = "0.6.10"
scoped-tls = "0.1.0"
slab = "0.3"
iovec = "0.1"
diff --git a/src/net/tcp.rs b/src/net/tcp.rs
index e24fc47..ee65f06 100644
--- a/src/net/tcp.rs
+++ b/src/net/tcp.rs
@@ -706,7 +706,7 @@
}
}
-#[cfg(unix)]
+#[cfg(all(unix, not(target_os = "fuchsia")))]
mod sys {
use std::os::unix::prelude::*;
use super::{TcpStream, TcpListener};
diff --git a/src/net/udp/mod.rs b/src/net/udp/mod.rs
index 9befb33..9bbbfda 100644
--- a/src/net/udp/mod.rs
+++ b/src/net/udp/mod.rs
@@ -415,7 +415,7 @@
}
}
-#[cfg(unix)]
+#[cfg(all(unix, not(target_os = "fuchsia")))]
mod sys {
use std::os::unix::prelude::*;
use super::UdpSocket;
diff --git a/src/reactor/mod.rs b/src/reactor/mod.rs
index 3e92b3b..1caa957 100644
--- a/src/reactor/mod.rs
+++ b/src/reactor/mod.rs
@@ -820,7 +820,7 @@
ready | platform::usize2ready(bits)
}
-#[cfg(unix)]
+#[cfg(all(unix, not(target_os = "fuchsia")))]
mod platform {
use mio::Ready;
use mio::unix::UnixReady;
@@ -871,7 +871,7 @@
}
}
-#[cfg(windows)]
+#[cfg(any(windows, target_os = "fuchsia"))]
mod platform {
use mio::Ready;