@@ -40,13 +40,17 @@ use libc::{c_int, mode_t};
4040) ) ]
4141use libc:: c_char;
4242#[ cfg( any(
43- target_os = "linux" ,
43+ all ( target_os = "linux" , not ( target_env = "musl" ) ) ,
4444 target_os = "emscripten" ,
4545 target_os = "android" ,
46- target_os = "hurd" ,
46+ target_os = "hurd"
4747) ) ]
4848use 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+ ) ) ]
5054use libc:: fstatat64;
5155#[ cfg( any(
5256 target_os = "android" ,
@@ -57,9 +61,10 @@ use libc::fstatat64;
5761 target_os = "aix" ,
5862 target_os = "nto" ,
5963 target_os = "vita" ,
64+ all( target_os = "linux" , target_env = "musl" ) ,
6065) ) ]
6166use 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" ) ) ]
6368use libc:: readdir64;
6469#[ cfg( any( target_os = "emscripten" , target_os = "l4re" ) ) ]
6570use libc:: readdir64_r;
@@ -84,7 +89,7 @@ use libc::{
8489 lstat as lstat64, off64_t, open as open64, stat as stat64,
8590} ;
8691#[ cfg( not( any(
87- target_os = "linux" ,
92+ all ( target_os = "linux" , not ( target_env = "musl" ) ) ,
8893 target_os = "emscripten" ,
8994 target_os = "l4re" ,
9095 target_os = "android" ,
@@ -95,7 +100,7 @@ use libc::{
95100 lstat as lstat64, off_t as off64_t, open as open64, stat as stat64,
96101} ;
97102#[ cfg( any(
98- target_os = "linux" ,
103+ all ( target_os = "linux" , not ( target_env = "musl" ) ) ,
99104 target_os = "emscripten" ,
100105 target_os = "l4re" ,
101106 target_os = "hurd"
@@ -853,10 +858,10 @@ impl DirEntry {
853858
854859 #[ cfg( all(
855860 any(
856- target_os = "linux" ,
861+ all ( target_os = "linux" , not ( target_env = "musl" ) ) ,
857862 target_os = "emscripten" ,
858863 target_os = "android" ,
859- target_os = "hurd" ,
864+ target_os = "hurd"
860865 ) ,
861866 not( miri)
862867 ) ) ]
@@ -882,7 +887,7 @@ impl DirEntry {
882887
883888 #[ cfg( any(
884889 not( any(
885- target_os = "linux" ,
890+ all ( target_os = "linux" , not ( target_env = "musl" ) ) ,
886891 target_os = "emscripten" ,
887892 target_os = "android" ,
888893 target_os = "hurd" ,
0 commit comments