File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ mod test_signal;
11
11
target_os = "macos" ,
12
12
target_os = "netbsd" ) ) ]
13
13
mod test_aio;
14
- #[ cfg( not( any ( target_os = "redox" ) ) ) ]
14
+ #[ cfg( not( target_os = "redox" ) ) ]
15
15
mod test_mman;
16
16
#[ cfg( target_os = "linux" ) ]
17
17
mod test_signalfd;
Original file line number Diff line number Diff line change @@ -1032,11 +1032,17 @@ fn test_access_file_exists() {
1032
1032
assert ! ( access( & path, AccessFlags :: R_OK | AccessFlags :: W_OK ) . is_ok( ) ) ;
1033
1033
}
1034
1034
1035
- #[ cfg( not( any ( target_os = "redox" , target_os = "haiku" ) ) ) ]
1035
+ #[ cfg( not( target_os = "redox" ) ) ]
1036
1036
#[ test]
1037
1037
fn test_user_into_passwd ( ) {
1038
1038
// get the UID of the "nobody" user
1039
- let nobody = User :: from_name ( "nobody" ) . unwrap ( ) . unwrap ( ) ;
1039
+ #[ cfg( not( target_os = "haiku" ) ) ]
1040
+ let test_username = "nobody" ;
1041
+ // "nobody" unavailable on haiku
1042
+ #[ cfg( target_os = "haiku" ) ]
1043
+ let test_username = "user" ;
1044
+
1045
+ let nobody = User :: from_name ( test_username) . unwrap ( ) . unwrap ( ) ;
1040
1046
let pwd: libc:: passwd = nobody. into ( ) ;
1041
1047
let _: User = ( & pwd) . into ( ) ;
1042
1048
}
You can’t perform that action at this time.
0 commit comments