File tree 1 file changed +18
-1
lines changed
1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -185,6 +185,12 @@ struct InnerReadDir {
185
185
186
186
pub struct ReadDir {
187
187
inner : Arc < InnerReadDir > ,
188
+ #[ cfg( not( any(
189
+ target_os = "solaris" ,
190
+ target_os = "illumos" ,
191
+ target_os = "fuchsia" ,
192
+ target_os = "redox" ,
193
+ ) ) ) ]
188
194
end_of_stream : bool ,
189
195
}
190
196
@@ -943,7 +949,18 @@ pub fn readdir(p: &Path) -> io::Result<ReadDir> {
943
949
Err ( Error :: last_os_error ( ) )
944
950
} else {
945
951
let inner = InnerReadDir { dirp : Dir ( ptr) , root } ;
946
- Ok ( ReadDir { inner : Arc :: new ( inner) , end_of_stream : false } )
952
+ cfg_if:: cfg_if! {
953
+ if #[ cfg( not( any(
954
+ target_os = "solaris" ,
955
+ target_os = "illumos" ,
956
+ target_os = "fuchsia" ,
957
+ target_os = "redox" ,
958
+ ) ) ) ] {
959
+ Ok ( ReadDir { inner: Arc :: new( inner) , end_of_stream: false } )
960
+ } else {
961
+ Ok ( ReadDir { inner: Arc :: new( inner) } )
962
+ }
963
+ }
947
964
}
948
965
}
949
966
}
You can’t perform that action at this time.
0 commit comments