summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Nathan <andre@digirati.com.br>2020-03-17 17:47:26 -0300
committerAndre Nathan <andre@digirati.com.br>2020-03-17 17:47:26 -0300
commit360bdfb789714ac1e87208cdf4b45942e4f495f7 (patch)
treeb873719ec7508a4d4832bb6bea0474a97c4cbaa9
parent08be41eccfffb42b93946d0a46849a43f8f128b0 (diff)
downloadnix-360bdfb789714ac1e87208cdf4b45942e4f495f7.zip
Handle open file descriptor locks in fcntl
-rw-r--r--src/fcntl.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/fcntl.rs b/src/fcntl.rs
index 1d66eb75..4754dd8e 100644
--- a/src/fcntl.rs
+++ b/src/fcntl.rs
@@ -286,6 +286,12 @@ pub fn fcntl(fd: RawFd, arg: FcntlArg) -> Result<c_int> {
F_SETLKW(flock) => libc::fcntl(fd, libc::F_SETLKW, flock),
F_GETLK(flock) => libc::fcntl(fd, libc::F_GETLK, flock),
#[cfg(any(target_os = "android", target_os = "linux"))]
+ F_OFD_SETLK(flock) => libc::fcntl(fd, libc::F_OFD_SETLK, flock),
+ #[cfg(any(target_os = "android", target_os = "linux"))]
+ F_OFD_SETLKW(flock) => libc::fcntl(fd, libc::F_OFD_SETLKW, flock),
+ #[cfg(any(target_os = "android", target_os = "linux"))]
+ F_OFD_GETLK(flock) => libc::fcntl(fd, libc::F_OFD_GETLK, flock),
+ #[cfg(any(target_os = "android", target_os = "linux"))]
F_ADD_SEALS(flag) => libc::fcntl(fd, libc::F_ADD_SEALS, flag.bits()),
#[cfg(any(target_os = "android", target_os = "linux"))]
F_GET_SEALS => libc::fcntl(fd, libc::F_GET_SEALS),
@@ -295,8 +301,6 @@ pub fn fcntl(fd: RawFd, arg: FcntlArg) -> Result<c_int> {
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!()
}
};