@@ -35,6 +35,7 @@ use libc::dirfd;
35
35
#[ cfg( any( target_os = "linux" , target_os = "emscripten" ) ) ]
36
36
use libc:: fstatat64;
37
37
#[ cfg( any(
38
+ target_os = "android" ,
38
39
target_os = "solaris" ,
39
40
target_os = "fuchsia" ,
40
41
target_os = "redox" ,
@@ -46,6 +47,7 @@ use libc::readdir64;
46
47
#[ cfg( any( target_os = "emscripten" , target_os = "l4re" ) ) ]
47
48
use libc:: readdir64_r;
48
49
#[ cfg( not( any(
50
+ target_os = "android" ,
49
51
target_os = "linux" ,
50
52
target_os = "emscripten" ,
51
53
target_os = "solaris" ,
@@ -211,6 +213,7 @@ struct InnerReadDir {
211
213
pub struct ReadDir {
212
214
inner : Arc < InnerReadDir > ,
213
215
#[ cfg( not( any(
216
+ target_os = "android" ,
214
217
target_os = "linux" ,
215
218
target_os = "solaris" ,
216
219
target_os = "illumos" ,
@@ -232,6 +235,7 @@ pub struct DirEntry {
232
235
// readdir() (not readdir_r()), because a) struct dirent may use a flexible
233
236
// array to store the name, b) it lives only until the next readdir() call.
234
237
#[ cfg( any(
238
+ target_os = "android" ,
235
239
target_os = "linux" ,
236
240
target_os = "solaris" ,
237
241
target_os = "illumos" ,
@@ -459,6 +463,7 @@ impl Iterator for ReadDir {
459
463
type Item = io:: Result < DirEntry > ;
460
464
461
465
#[ cfg( any(
466
+ target_os = "android" ,
462
467
target_os = "linux" ,
463
468
target_os = "solaris" ,
464
469
target_os = "fuchsia" ,
@@ -498,6 +503,7 @@ impl Iterator for ReadDir {
498
503
}
499
504
500
505
#[ cfg( not( any(
506
+ target_os = "android" ,
501
507
target_os = "linux" ,
502
508
target_os = "solaris" ,
503
509
target_os = "fuchsia" ,
@@ -665,6 +671,7 @@ impl DirEntry {
665
671
}
666
672
667
673
#[ cfg( not( any(
674
+ target_os = "android" ,
668
675
target_os = "linux" ,
669
676
target_os = "solaris" ,
670
677
target_os = "illumos" ,
@@ -675,6 +682,7 @@ impl DirEntry {
675
682
unsafe { CStr :: from_ptr ( self . entry . d_name . as_ptr ( ) ) }
676
683
}
677
684
#[ cfg( any(
685
+ target_os = "android" ,
678
686
target_os = "linux" ,
679
687
target_os = "solaris" ,
680
688
target_os = "illumos" ,
@@ -1086,6 +1094,7 @@ pub fn readdir(p: &Path) -> io::Result<ReadDir> {
1086
1094
Ok ( ReadDir {
1087
1095
inner : Arc :: new ( inner) ,
1088
1096
#[ cfg( not( any(
1097
+ target_os = "android" ,
1089
1098
target_os = "linux" ,
1090
1099
target_os = "solaris" ,
1091
1100
target_os = "illumos" ,
@@ -1622,6 +1631,7 @@ mod remove_dir_impl {
1622
1631
ReadDir {
1623
1632
inner : Arc :: new ( InnerReadDir { dirp, root : dummy_root } ) ,
1624
1633
#[ cfg( not( any(
1634
+ target_os = "android" ,
1625
1635
target_os = "linux" ,
1626
1636
target_os = "solaris" ,
1627
1637
target_os = "illumos" ,
0 commit comments