1
- #[ cfg( not( target_os = "redox" ) ) ]
1
+ #[ cfg( not( any ( target_os = "redox" , target_os = "haiku" ) ) ) ]
2
2
use std:: fs;
3
3
use std:: fs:: File ;
4
4
#[ cfg( not( target_os = "redox" ) ) ]
5
- use std:: os:: unix:: fs:: { symlink, PermissionsExt } ;
5
+ use std:: os:: unix:: fs:: { symlink} ;
6
+ #[ cfg( not( any( target_os = "redox" , target_os = "haiku" ) ) ) ]
7
+ use std:: os:: unix:: fs:: { PermissionsExt } ;
6
8
use std:: os:: unix:: prelude:: AsRawFd ;
7
- #[ cfg( not( target_os = "redox" ) ) ]
9
+ #[ cfg( not( any ( target_os = "redox" , target_os = "haiku" ) ) ) ]
8
10
use std:: time:: { Duration , UNIX_EPOCH } ;
9
11
#[ cfg( not( target_os = "redox" ) ) ]
10
12
use std:: path:: Path ;
@@ -18,25 +20,30 @@ use nix::fcntl;
18
20
#[ cfg( not( target_os = "redox" ) ) ]
19
21
use nix:: errno:: Errno ;
20
22
#[ cfg( not( target_os = "redox" ) ) ]
21
- use nix:: sys:: stat:: { self , futimens, utimes} ;
23
+ use nix:: sys:: stat:: { self } ;
24
+ #[ cfg( not( any( target_os = "redox" , target_os = "haiku" ) ) ) ]
25
+ use nix:: sys:: stat:: { futimens, utimes} ;
22
26
use nix:: sys:: stat:: { fchmod, stat} ;
23
27
#[ cfg( not( target_os = "redox" ) ) ]
24
- use nix:: sys:: stat:: { fchmodat, utimensat, mkdirat} ;
28
+ use nix:: sys:: stat:: { fchmodat, mkdirat} ;
29
+ #[ cfg( not( any( target_os = "redox" , target_os = "haiku" ) ) ) ]
30
+ use nix:: sys:: stat:: { utimensat} ;
25
31
#[ cfg( any( target_os = "linux" ,
26
- target_os = "haiku" ,
27
32
target_os = "ios" ,
28
33
target_os = "macos" ,
29
34
target_os = "freebsd" ,
30
35
target_os = "netbsd" ) ) ]
31
36
use nix:: sys:: stat:: lutimes;
32
37
#[ cfg( not( target_os = "redox" ) ) ]
38
+ use nix:: sys:: stat:: { FchmodatFlags } ;
39
+ #[ cfg( not( any( target_os = "redox" , target_os = "haiku" ) ) ) ]
33
40
use nix:: sys:: stat:: { FchmodatFlags , UtimensatFlags } ;
34
41
use nix:: sys:: stat:: Mode ;
35
42
36
43
#[ cfg( not( any( target_os = "netbsd" , target_os = "redox" ) ) ) ]
37
44
use nix:: sys:: stat:: FileStat ;
38
45
39
- #[ cfg( not( target_os = "redox" ) ) ]
46
+ #[ cfg( not( any ( target_os = "redox" , target_os = "haiku" ) ) ) ]
40
47
use nix:: sys:: time:: { TimeSpec , TimeVal , TimeValLike } ;
41
48
#[ cfg( not( target_os = "redox" ) ) ]
42
49
use nix:: unistd:: chdir;
@@ -191,7 +198,7 @@ fn test_fchmodat() {
191
198
///
192
199
/// The atime and mtime are expressed with a resolution of seconds because some file systems
193
200
/// (like macOS's HFS+) do not have higher granularity.
194
- #[ cfg( not( target_os = "redox" ) ) ]
201
+ #[ cfg( not( any ( target_os = "redox" , target_os = "haiku" ) ) ) ]
195
202
fn assert_times_eq ( exp_atime_sec : u64 , exp_mtime_sec : u64 , attr : & fs:: Metadata ) {
196
203
assert_eq ! (
197
204
Duration :: new( exp_atime_sec, 0 ) ,
0 commit comments