File tree Expand file tree Collapse file tree 3 files changed +2
-8
lines changed Expand file tree Collapse file tree 3 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ mod macros;
6969// type that allows larger offsets to be used. We define our own off_t type
7070// that is large enough to represent all file offsets the platform supports.
7171cfg_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 ") ) ] {
7373 /// Used to represent offsets in files. May differ from libc::off_t
7474 /// on platforms where libc::off_t cannot represent the full range
7575 /// of file offsets.
Original file line number Diff line number Diff line change @@ -333,7 +333,7 @@ macro_rules! libc_enum {
333333}
334334
335335cfg_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 ") ) ] {
337337 /// Function variant that supports large file positions.
338338 ///
339339 /// 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>>(
5050 iov : & [ IoSlice < ' _ > ] ,
5151 offset : Off ,
5252) -> Result < usize > {
53- #[ cfg( target_env = "uclibc" ) ]
54- let offset = offset as libc:: off64_t ; // uclibc doesn't use off_t
55-
5653 // SAFETY: same as in writev()
5754 let res = unsafe {
5855 largefile_fn ! [ pwritev] (
@@ -80,9 +77,6 @@ pub fn preadv<Fd: AsFd, Off: Into<off_t>>(
8077 iov : & mut [ IoSliceMut < ' _ > ] ,
8178 offset : Off ,
8279) -> Result < usize > {
83- #[ cfg( target_env = "uclibc" ) ]
84- let offset = offset as libc:: off64_t ; // uclibc doesn't use off_t
85-
8680 // SAFETY: same as in readv()
8781 let res = unsafe {
8882 largefile_fn ! [ preadv] (
You can’t perform that action at this time.
0 commit comments