From 1256e150519ebb7d3840e985884d8e21afb1dd25 Mon Sep 17 00:00:00 2001 From: Jesse Hoogervorst Date: Fri, 15 Nov 2024 16:26:52 +0100 Subject: [PATCH] Changed type definition and removed reserved field (+1 squashed commits) Squashed commits: [19a852646] Removed polyfill implementation and updated struct and constants required (+2 squashed commit) Squashed commit: [7aeabc9a5] Fixed style issues [a3932998e] Implemented flock for vxworks using ioctl --- src/vxworks/mod.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/vxworks/mod.rs b/src/vxworks/mod.rs index 2a8e3b0a60d01..d33f52cd65556 100644 --- a/src/vxworks/mod.rs +++ b/src/vxworks/mod.rs @@ -413,6 +413,14 @@ s! { pub mq_flags: ::c_long, pub mq_curmsgs: ::c_long, } + + pub struct flock { + pub l_type: ::c_short, + pub l_whence: ::c_short, + pub l_start: ::c_long, + pub l_len: ::c_long, + pub l_pid: ::c_long, + } } s_no_extra_traits! { @@ -944,6 +952,9 @@ pub const F_GETLK: ::c_int = 7; pub const F_SETLK: ::c_int = 8; pub const F_SETLKW: ::c_int = 9; pub const F_DUPFD_CLOEXEC: ::c_int = 14; +pub const F_RDLCK: ::c_int = 1; +pub const F_WRLCK: ::c_int = 2; +pub const F_UNLCK: ::c_int = 3; // signal.h pub const SIG_DFL: sighandler_t = 0 as sighandler_t;