diff options
Diffstat (limited to 'src/fcntl.rs')
-rw-r--r-- | src/fcntl.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/fcntl.rs b/src/fcntl.rs index 9a3c601d..64e9fb60 100644 --- a/src/fcntl.rs +++ b/src/fcntl.rs @@ -48,6 +48,10 @@ pub enum FcntlArg<'a> { F_GET_SEALS, #[cfg(any(target_os = "macos", target_os = "ios"))] F_FULLFSYNC, + #[cfg(any(target_os = "linux", target_os = "android"))] + F_GETPIPE_SZ, + #[cfg(any(target_os = "linux", target_os = "android"))] + F_SETPIPE_SZ(libc::c_int), // TODO: Rest of flags } @@ -74,6 +78,10 @@ pub fn fcntl(fd: RawFd, arg: FcntlArg) -> Result<c_int> { #[cfg(any(target_os = "macos", target_os = "ios"))] F_FULLFSYNC => libc::fcntl(fd, libc::F_FULLFSYNC), #[cfg(any(target_os = "linux", target_os = "android"))] + F_GETPIPE_SZ => libc::fcntl(fd, libc::F_GETPIPE_SZ), + #[cfg(any(target_os = "linux", target_os = "android"))] + F_SETPIPE_SZ(size) => libc::fcntl(fd, libc::F_SETPIPE_SZ, size), + #[cfg(any(target_os = "linux", target_os = "android"))] _ => unimplemented!() } }; |