Skip to content

Commit 90f6821

Browse files
committed
fix imports for haiku and redox
1 parent 9dc197d commit 90f6821

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

test/sys/test_uio.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1+
#[cfg(not(target_os = "redox"))]
12
use crate::require_largefile;
23
use nix::sys::uio::*;
34
use nix::unistd::*;
45
use rand::distributions::Alphanumeric;
56
use rand::{thread_rng, Rng};
67
use std::fs::OpenOptions;
7-
use std::io::{IoSlice, Read, Seek, SeekFrom, Write};
8+
use std::io::{IoSlice, Write};
9+
#[cfg(not(target_os = "redox"))]
810
use std::os::unix::fs::FileExt;
911
use std::os::unix::io::{FromRawFd, OwnedFd};
1012
use std::{cmp, iter};
1113

1214
#[cfg(not(target_os = "redox"))]
13-
use std::io::IoSliceMut;
15+
use std::io::{IoSliceMut, Read, Seek, SeekFrom};
1416

1517
use tempfile::tempdir;
1618
#[cfg(not(target_os = "redox"))]

test/test_fcntl.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#[cfg(not(target_os = "redox"))]
12
use crate::require_largefile;
23
#[cfg(not(target_os = "redox"))]
34
use nix::errno::*;
@@ -30,6 +31,7 @@ use std::os::unix::fs;
3031
use tempfile::{self, tempdir, NamedTempFile};
3132

3233
#[test]
34+
#[cfg(not(target_os = "redox"))]
3335
fn test_open_largefile() {
3436
// Checks that files opened with open can grow beyond 32-bit file size.
3537
// On some platforms, this requires opening the file with an alternative

test/test_unistd.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use cfg_if::cfg_if;
12
use libc::{_exit, mode_t};
23
use nix::errno::Errno;
34
#[cfg(not(any(target_os = "redox", target_os = "haiku")))]

0 commit comments

Comments
 (0)