From 6617f6afdaee7cadc4b3d727c3b397256aafbc10 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Fri, 19 Dec 2025 09:23:33 -0700 Subject: [PATCH] Define F_OFD fcntl commands --- src/header/fcntl/mod.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/header/fcntl/mod.rs b/src/header/fcntl/mod.rs index dd3dd21ab6..81c7b2887d 100644 --- a/src/header/fcntl/mod.rs +++ b/src/header/fcntl/mod.rs @@ -35,6 +35,9 @@ pub const F_SETFL: c_int = 4; pub const F_GETLK: c_int = 5; pub const F_SETLK: c_int = 6; pub const F_SETLKW: c_int = 7; +pub const F_OFD_GETLK: c_int = 36; +pub const F_OFD_SETLK: c_int = 37; +pub const F_OFD_SETLKW: c_int = 38; pub const F_DUPFD_CLOEXEC: c_int = 1030; pub const F_RDLCK: c_int = 0; @@ -68,9 +71,8 @@ pub struct flock { pub unsafe extern "C" fn fcntl(fildes: c_int, cmd: c_int, mut __valist: ...) -> c_int { // c_ulonglong let arg = match cmd { - F_DUPFD | F_SETFD | F_SETFL | F_SETLK | F_SETLKW | F_GETLK | F_DUPFD_CLOEXEC => unsafe { - __valist.arg::() - }, + F_DUPFD | F_SETFD | F_SETFL | F_GETLK | F_SETLK | F_SETLKW | F_OFD_GETLK | F_OFD_SETLK + | F_OFD_SETLKW | F_DUPFD_CLOEXEC => unsafe { __valist.arg::() }, _ => 0, };