1
1
#[ cfg( not( target_os = "redox" ) ) ]
2
2
use nix:: fcntl:: { self , open, readlink} ;
3
- use nix:: fcntl:: { fcntl , FcntlArg , FdFlag , OFlag } ;
3
+ use nix:: fcntl:: OFlag ;
4
4
use nix:: unistd:: * ;
5
5
use nix:: unistd:: ForkResult :: * ;
6
6
#[ cfg( not( target_os = "redox" ) ) ]
@@ -13,14 +13,14 @@ use nix::errno::Errno;
13
13
#[ cfg( not( target_os = "redox" ) ) ]
14
14
use nix:: Error ;
15
15
use std:: { env, iter} ;
16
- #[ cfg( not( target_os = "redox" ) ) ]
16
+ #[ cfg( not( any ( target_os = "fuchsia" , target_os = " redox") ) ) ]
17
17
use std:: ffi:: CString ;
18
18
#[ cfg( not( target_os = "redox" ) ) ]
19
19
use std:: fs:: DirBuilder ;
20
20
use std:: fs:: { self , File } ;
21
21
use std:: io:: Write ;
22
22
use std:: os:: unix:: prelude:: * ;
23
- #[ cfg( not( target_os = "redox" ) ) ]
23
+ #[ cfg( not( any ( target_os = "fuchsia" , target_os = " redox") ) ) ]
24
24
use std:: path:: Path ;
25
25
use tempfile:: { tempdir, tempfile} ;
26
26
use libc:: { _exit, mode_t, off_t} ;
@@ -135,6 +135,8 @@ fn test_mkfifoat_none() {
135
135
target_os = "macos" , target_os = "ios" ,
136
136
target_os = "android" , target_os = "redox" ) ) ) ]
137
137
fn test_mkfifoat ( ) {
138
+ use nix:: fcntl;
139
+
138
140
let tempdir = tempdir ( ) . unwrap ( ) ;
139
141
let dirfd = open ( tempdir. path ( ) , OFlag :: empty ( ) , Mode :: empty ( ) ) . unwrap ( ) ;
140
142
let mkfifoat_name = "mkfifoat_name" ;
@@ -258,7 +260,7 @@ fn test_initgroups() {
258
260
setgroups ( & old_groups) . unwrap ( ) ;
259
261
}
260
262
261
- #[ cfg( not( target_os = "redox" ) ) ]
263
+ #[ cfg( not( any ( target_os = "fuchsia" , target_os = " redox") ) ) ]
262
264
macro_rules! execve_test_factory(
263
265
( $test_name: ident, $syscall: ident, $exe: expr $( , $pathname: expr, $flags: expr) * ) => (
264
266
@@ -669,6 +671,8 @@ fn test_pipe() {
669
671
target_os = "solaris" ) ) ]
670
672
#[ test]
671
673
fn test_pipe2 ( ) {
674
+ use nix:: fcntl:: { fcntl, FcntlArg , FdFlag } ;
675
+
672
676
let ( fd0, fd1) = pipe2 ( OFlag :: O_CLOEXEC ) . unwrap ( ) ;
673
677
let f0 = FdFlag :: from_bits_truncate ( fcntl ( fd0, FcntlArg :: F_GETFD ) . unwrap ( ) ) ;
674
678
assert ! ( f0. contains( FdFlag :: FD_CLOEXEC ) ) ;
0 commit comments