@@ -54,8 +54,7 @@ use libc::{c_int, mode_t};
54
54
#[ cfg( target_os = "android" ) ]
55
55
use libc:: {
56
56
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,
59
58
} ;
60
59
#[ cfg( not( any(
61
60
all( target_os = "linux" , not( target_env = "musl" ) ) ,
@@ -65,18 +64,37 @@ use libc::{
65
64
) ) ) ]
66
65
use libc:: {
67
66
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,
70
68
} ;
71
69
#[ cfg( any(
72
70
all( target_os = "linux" , not( target_env = "musl" ) ) ,
73
71
target_os = "l4re" ,
74
72
target_os = "hurd"
75
73
) ) ]
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} ;
80
98
81
99
#[ cfg( any( target_os = "freebsd" , target_os = "aix" ) ) ]
82
100
const TRAVERSE_DIRECTORY : i32 = libc:: O_EXEC ;
0 commit comments