@@ -40,13 +40,17 @@ use libc::{c_int, mode_t};
40
40
) ) ]
41
41
use libc:: c_char;
42
42
#[ cfg( any(
43
- target_os = "linux" ,
43
+ all ( target_os = "linux" , not ( target_env = "musl" ) ) ,
44
44
target_os = "emscripten" ,
45
45
target_os = "android" ,
46
- target_os = "hurd" ,
46
+ target_os = "hurd"
47
47
) ) ]
48
48
use libc:: dirfd;
49
- #[ cfg( any( target_os = "linux" , target_os = "emscripten" , target_os = "hurd" ) ) ]
49
+ #[ cfg( any(
50
+ all( target_os = "linux" , not( target_env = "musl" ) ) ,
51
+ target_os = "emscripten" ,
52
+ target_os = "hurd"
53
+ ) ) ]
50
54
use libc:: fstatat64;
51
55
#[ cfg( any(
52
56
target_os = "android" ,
@@ -57,9 +61,10 @@ use libc::fstatat64;
57
61
target_os = "aix" ,
58
62
target_os = "nto" ,
59
63
target_os = "vita" ,
64
+ all( target_os = "linux" , target_env = "musl" ) ,
60
65
) ) ]
61
66
use libc:: readdir as readdir64;
62
- #[ cfg( any( target_os = "linux" , target_os = "hurd" ) ) ]
67
+ #[ cfg( any( all ( target_os = "linux" , not ( target_env = "musl" ) ) , target_os = "hurd" ) ) ]
63
68
use libc:: readdir64;
64
69
#[ cfg( any( target_os = "emscripten" , target_os = "l4re" ) ) ]
65
70
use libc:: readdir64_r;
@@ -84,7 +89,7 @@ use libc::{
84
89
lstat as lstat64, off64_t, open as open64, stat as stat64,
85
90
} ;
86
91
#[ cfg( not( any(
87
- target_os = "linux" ,
92
+ all ( target_os = "linux" , not ( target_env = "musl" ) ) ,
88
93
target_os = "emscripten" ,
89
94
target_os = "l4re" ,
90
95
target_os = "android" ,
@@ -95,7 +100,7 @@ use libc::{
95
100
lstat as lstat64, off_t as off64_t, open as open64, stat as stat64,
96
101
} ;
97
102
#[ cfg( any(
98
- target_os = "linux" ,
103
+ all ( target_os = "linux" , not ( target_env = "musl" ) ) ,
99
104
target_os = "emscripten" ,
100
105
target_os = "l4re" ,
101
106
target_os = "hurd"
@@ -853,10 +858,10 @@ impl DirEntry {
853
858
854
859
#[ cfg( all(
855
860
any(
856
- target_os = "linux" ,
861
+ all ( target_os = "linux" , not ( target_env = "musl" ) ) ,
857
862
target_os = "emscripten" ,
858
863
target_os = "android" ,
859
- target_os = "hurd" ,
864
+ target_os = "hurd"
860
865
) ,
861
866
not( miri)
862
867
) ) ]
@@ -882,7 +887,7 @@ impl DirEntry {
882
887
883
888
#[ cfg( any(
884
889
not( any(
885
- target_os = "linux" ,
890
+ all ( target_os = "linux" , not ( target_env = "musl" ) ) ,
886
891
target_os = "emscripten" ,
887
892
target_os = "android" ,
888
893
target_os = "hurd" ,
0 commit comments