File tree Expand file tree Collapse file tree 4 files changed +12
-6
lines changed Expand file tree Collapse file tree 4 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 1
- #! [ cfg( target_os = "linux" ) ]
1
+ #[ cfg( target_os = "linux" ) ]
2
2
uucore:: bin!( uu_chcon) ;
3
+
4
+ #[ cfg( not( target_os = "linux" ) ) ]
5
+ fn main ( ) { }
Original file line number Diff line number Diff line change @@ -1083,11 +1083,11 @@ impl Config {
1083
1083
time_format_older,
1084
1084
context,
1085
1085
selinux_supported : {
1086
- #[ cfg( feature = "selinux" ) ]
1086
+ #[ cfg( all ( feature = "selinux" , target_os = "linux" ) ) ]
1087
1087
{
1088
1088
uucore:: selinux:: is_selinux_enabled ( )
1089
1089
}
1090
- #[ cfg( not( feature = "selinux" ) ) ]
1090
+ #[ cfg( not( all ( feature = "selinux" , target_os = "linux" ) ) ) ]
1091
1091
{
1092
1092
false
1093
1093
}
Original file line number Diff line number Diff line change 1
- #! [ cfg( target_os = "linux" ) ]
1
+ #[ cfg( target_os = "linux" ) ]
2
2
uucore:: bin!( uu_runcon) ;
3
+
4
+ #[ cfg( not( target_os = "linux" ) ) ]
5
+ fn main ( ) { }
Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ fn test_cat_broken_pipe_nonzero_and_message() {
10
10
let mut fds: [ libc:: c_int ; 2 ] = [ 0 , 0 ] ;
11
11
assert_eq ! ( libc:: pipe( fds. as_mut_ptr( ) ) , 0 , "Failed to create pipe" ) ;
12
12
// Close the read end to simulate a broken pipe on stdout
13
- let _read_end = File :: from_raw_fd ( fds[ 0 ] ) ;
13
+ let read_end = File :: from_raw_fd ( fds[ 0 ] ) ;
14
14
// Explicitly drop the read-end so writers see EPIPE instead of blocking on a full pipe
15
- std:: mem:: drop ( _read_end ) ;
15
+ std:: mem:: drop ( read_end ) ;
16
16
let write_end = File :: from_raw_fd ( fds[ 1 ] ) ;
17
17
18
18
let content = ( 0 ..10000 ) . map ( |_| "x" ) . collect :: < String > ( ) ;
You can’t perform that action at this time.
0 commit comments