diff options
author | Bryant Mairs <bryant@mai.rs> | 2017-07-16 21:23:55 -0700 |
---|---|---|
committer | Bryant Mairs <bryant@mai.rs> | 2017-07-17 21:52:37 -0700 |
commit | 79ad5fa487d3d746aa3d03dc70bb133b96053d40 (patch) | |
tree | 155df135c088f84828a74ca81c689e4afb43c3c1 /src/sys | |
parent | c1ffefa56aaeef189e075dc14774e7f518b10b67 (diff) | |
download | nix-79ad5fa487d3d746aa3d03dc70bb133b96053d40.zip |
Remove preadv_pwritev feature in favor of conditional include
Diffstat (limited to 'src/sys')
-rw-r--r-- | src/sys/uio.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sys/uio.rs b/src/sys/uio.rs index 5af10930..edca8cb4 100644 --- a/src/sys/uio.rs +++ b/src/sys/uio.rs @@ -18,7 +18,7 @@ pub fn readv(fd: RawFd, iov: &mut [IoVec<&mut [u8]>]) -> Result<usize> { Errno::result(res).map(|r| r as usize) } -#[cfg(feature = "preadv_pwritev")] +#[cfg(target_os = "linux")] pub fn pwritev(fd: RawFd, iov: &[IoVec<&[u8]>], offset: off_t) -> Result<usize> { let res = unsafe { @@ -28,7 +28,7 @@ pub fn pwritev(fd: RawFd, iov: &[IoVec<&[u8]>], Errno::result(res).map(|r| r as usize) } -#[cfg(feature = "preadv_pwritev")] +#[cfg(target_os = "linux")] pub fn preadv(fd: RawFd, iov: &mut [IoVec<&mut [u8]>], offset: off_t) -> Result<usize> { let res = unsafe { @@ -57,7 +57,7 @@ pub fn pread(fd: RawFd, buf: &mut [u8], offset: off_t) -> Result<usize>{ } #[repr(C)] -pub struct IoVec<T>(libc::iovec, PhantomData<T>); +pub struct IoVec<T>(libc::iovec, PhantomData<T>); impl<T> IoVec<T> { #[inline] |