@@ -54,8 +54,7 @@ use libc::{c_int, mode_t};
5454#[ cfg( target_os = "android" ) ]
5555use libc:: {
5656 dirent as dirent64, fstat as fstat64, fstatat as fstatat64, ftruncate64, lseek64,
57- lstat as lstat64, mkdirat, off64_t, open as open64, openat as openat64, renameat,
58- stat as stat64, unlinkat,
57+ lstat as lstat64, off64_t, open as open64, stat as stat64,
5958} ;
6059#[ cfg( not( any(
6160 all( target_os = "linux" , not( target_env = "musl" ) ) ,
@@ -65,22 +64,41 @@ use libc::{
6564) ) ) ]
6665use libc:: {
6766 dirent as dirent64, fstat as fstat64, ftruncate as ftruncate64, lseek as lseek64,
68- lstat as lstat64, mkdirat, off_t as off64_t, open as open64, openat as openat64, renameat,
69- stat as stat64, unlinkat,
67+ lstat as lstat64, off_t as off64_t, open as open64, stat as stat64,
7068} ;
7169#[ cfg( any(
7270 all( target_os = "linux" , not( target_env = "musl" ) ) ,
7371 target_os = "l4re" ,
7472 target_os = "hurd"
7573) ) ]
76- use libc:: {
77- dirent64, fstat64, ftruncate64, lseek64, lstat64, mkdirat, off64_t, open64, openat64, renameat,
78- stat64, unlinkat,
79- } ;
74+ use libc:: { dirent64, fstat64, ftruncate64, lseek64, lstat64, off64_t, open64, stat64} ;
75+ #[ cfg( any(
76+ target_os = "aix" ,
77+ target_os = "freebsd" ,
78+ target_os = "fuchsia" ,
79+ target_os = "solaris" ,
80+ target_vendor = "apple" ,
81+ ) ) ]
82+ use libc:: { mkdirat, openat as openat64, renameat, unlinkat} ;
83+ #[ cfg( not( any(
84+ target_os = "redox" ,
85+ target_os = "espidf" ,
86+ target_os = "horizon" ,
87+ target_os = "vita" ,
88+ target_os = "nto" ,
89+ target_os = "vxworks" ,
90+ target_os = "fuchsia" ,
91+ target_os = "freebsd" ,
92+ target_os = "solaris" ,
93+ target_os = "aix" ,
94+ target_vendor = "apple" ,
95+ miri
96+ ) ) ) ]
97+ use libc:: { mkdirat, openat64, renameat, unlinkat} ;
8098
8199#[ cfg( any( target_os = "freebsd" , target_os = "aix" ) ) ]
82100const TRAVERSE_DIRECTORY : i32 = libc:: O_EXEC ;
83- #[ cfg( any( target_os = "linux" , target_os = "android" , target_os = "l4re" , target_os = "redox" ) ) ]
101+ #[ cfg( any( target_os = "linux" , target_os = "android" , target_os = "l4re" ) ) ]
84102const TRAVERSE_DIRECTORY : i32 = libc:: O_PATH ;
85103#[ cfg( target_os = "illumos" ) ]
86104const TRAVERSE_DIRECTORY : i32 = libc:: O_SEARCH ;
@@ -92,6 +110,12 @@ const TRAVERSE_DIRECTORY: i32 = libc::O_SEARCH;
92110 target_os = "l4re" ,
93111 target_os = "linux" ,
94112 target_os = "redox" ,
113+ target_os = "espidf" ,
114+ target_os = "horizon" ,
115+ target_os = "vita" ,
116+ target_os = "nto" ,
117+ target_os = "vxworks" ,
118+ miri
95119) ) ) ]
96120const TRAVERSE_DIRECTORY : i32 = libc:: O_RDONLY ;
97121
0 commit comments