File tree 3 files changed +2
-8
lines changed
3 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ mod macros;
69
69
// type that allows larger offsets to be used. We define our own off_t type
70
70
// that is large enough to represent all file offsets the platform supports.
71
71
cfg_if ! {
72
- if #[ cfg( all( target_os = "linux" , target_env = "gnu" ) ) ] {
72
+ if #[ cfg( any ( all( target_os = "linux" , target_env = "gnu" ) , target_env = "uclibc ") ) ] {
73
73
/// Used to represent offsets in files. May differ from libc::off_t
74
74
/// on platforms where libc::off_t cannot represent the full range
75
75
/// of file offsets.
Original file line number Diff line number Diff line change @@ -333,7 +333,7 @@ macro_rules! libc_enum {
333
333
}
334
334
335
335
cfg_if ! {
336
- if #[ cfg( all( target_os = "linux" , target_env = "gnu" ) ) ] {
336
+ if #[ cfg( any ( all( target_os = "linux" , target_env = "gnu" ) , target_env = "uclibc ") ) ] {
337
337
/// Function variant that supports large file positions.
338
338
///
339
339
/// On some platforms, the standard I/O functions support a limited
Original file line number Diff line number Diff line change @@ -50,9 +50,6 @@ pub fn pwritev<Fd: AsFd, Off: Into<off_t>>(
50
50
iov : & [ IoSlice < ' _ > ] ,
51
51
offset : Off ,
52
52
) -> Result < usize > {
53
- #[ cfg( target_env = "uclibc" ) ]
54
- let offset = offset as libc:: off64_t ; // uclibc doesn't use off_t
55
-
56
53
// SAFETY: same as in writev()
57
54
let res = unsafe {
58
55
largefile_fn ! [ pwritev] (
@@ -80,9 +77,6 @@ pub fn preadv<Fd: AsFd, Off: Into<off_t>>(
80
77
iov : & mut [ IoSliceMut < ' _ > ] ,
81
78
offset : Off ,
82
79
) -> Result < usize > {
83
- #[ cfg( target_env = "uclibc" ) ]
84
- let offset = offset as libc:: off64_t ; // uclibc doesn't use off_t
85
-
86
80
// SAFETY: same as in readv()
87
81
let res = unsafe {
88
82
largefile_fn ! [ preadv] (
You can’t perform that action at this time.
0 commit comments