summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sys/ioctl/mod.rs4
-rw-r--r--src/sys/mod.rs1
-rw-r--r--test/sys/test_uio.rs2
-rw-r--r--test/test_stat.rs6
-rw-r--r--test/test_unistd.rs4
5 files changed, 13 insertions, 4 deletions
diff --git a/src/sys/ioctl/mod.rs b/src/sys/ioctl/mod.rs
index 2837233f..3bcdd266 100644
--- a/src/sys/ioctl/mod.rs
+++ b/src/sys/ioctl/mod.rs
@@ -221,11 +221,11 @@
//!
//! # fn main() {}
//! ```
-#[cfg(any(target_os = "android", target_os = "linux"))]
+#[cfg(any(target_os = "android", target_os = "linux", target_os = "redox"))]
#[macro_use]
mod linux;
-#[cfg(any(target_os = "android", target_os = "linux"))]
+#[cfg(any(target_os = "android", target_os = "linux", target_os = "redox"))]
pub use self::linux::*;
#[cfg(any(target_os = "dragonfly",
diff --git a/src/sys/mod.rs b/src/sys/mod.rs
index 882a5c4a..1b2d5370 100644
--- a/src/sys/mod.rs
+++ b/src/sys/mod.rs
@@ -25,6 +25,7 @@ pub mod eventfd;
target_os = "freebsd",
target_os = "ios",
target_os = "linux",
+ target_os = "redox",
target_os = "macos",
target_os = "netbsd",
target_os = "openbsd"))]
diff --git a/test/sys/test_uio.rs b/test/sys/test_uio.rs
index 62c9f954..7601e02f 100644
--- a/test/sys/test_uio.rs
+++ b/test/sys/test_uio.rs
@@ -53,6 +53,7 @@ fn test_writev() {
}
#[test]
+#[cfg(not(target_os = "redox"))]
fn test_readv() {
let s:String = thread_rng().sample_iter(&Alphanumeric).take(128).collect();
let to_write = s.as_bytes().to_vec();
@@ -97,6 +98,7 @@ fn test_readv() {
}
#[test]
+#[cfg(not(target_os = "redox"))]
fn test_pwrite() {
use std::io::Read;
diff --git a/test/test_stat.rs b/test/test_stat.rs
index 4a4a2c6a..b003ed09 100644
--- a/test/test_stat.rs
+++ b/test/test_stat.rs
@@ -78,7 +78,7 @@ fn assert_lstat_results(stat_result: Result<FileStat>) {
}
#[test]
-#[cfg(not(any(target_os = "netbsd")))]
+#[cfg(not(any(target_os = "netbsd", target_os = "redox")))]
fn test_stat_and_fstat() {
use nix::sys::stat::fstat;
@@ -110,7 +110,7 @@ fn test_fstatat() {
}
#[test]
-#[cfg(not(any(target_os = "netbsd")))]
+#[cfg(not(any(target_os = "netbsd", target_os = "redox")))]
fn test_stat_fstat_lstat() {
use nix::sys::stat::{fstat, lstat};
@@ -199,6 +199,7 @@ fn assert_times_eq(exp_atime_sec: u64, exp_mtime_sec: u64, attr: &fs::Metadata)
}
#[test]
+#[cfg(not(target_os = "redox"))]
fn test_utimes() {
let tempdir = tempfile::tempdir().unwrap();
let fullpath = tempdir.path().join("file");
@@ -234,6 +235,7 @@ fn test_lutimes() {
}
#[test]
+#[cfg(not(target_os = "redox"))]
fn test_futimens() {
let tempdir = tempfile::tempdir().unwrap();
let fullpath = tempdir.path().join("file");
diff --git a/test/test_unistd.rs b/test/test_unistd.rs
index 99f5d29d..cc64a285 100644
--- a/test/test_unistd.rs
+++ b/test/test_unistd.rs
@@ -81,6 +81,7 @@ fn test_mkstemp_directory() {
}
#[test]
+#[cfg(not(target_os = "redox"))]
fn test_mkfifo() {
let tempdir = tempfile::tempdir().unwrap();
let mkfifo_fifo = tempdir.path().join("mkfifo_fifo");
@@ -93,6 +94,7 @@ fn test_mkfifo() {
}
#[test]
+#[cfg(not(target_os = "redox"))]
fn test_mkfifo_directory() {
// mkfifo should fail if a directory is given
assert!(mkfifo(&env::temp_dir(), Mode::S_IRUSR).is_err());
@@ -599,6 +601,7 @@ pub extern fn alarm_signal_handler(raw_signal: libc::c_int) {
}
#[test]
+#[cfg(not(target_os = "redox"))]
fn test_alarm() {
let _m = ::SIGNAL_MTX.lock().expect("Mutex got poisoned by another test");
@@ -628,6 +631,7 @@ fn test_alarm() {
}
#[test]
+#[cfg(not(target_os = "redox"))]
fn test_canceling_alarm() {
let _m = ::SIGNAL_MTX.lock().expect("Mutex got poisoned by another test");