Skip to content

Commit 4f3ec99

Browse files
committed
Auto merge of rust-lang#485 - dhduvall:solaris-flock, r=alexcrichton
Add Solaris constants for fcntl-style advisory locking Solaris doesn't implement flock(), so any Rust implementation of flock() will need to implement it using fcntl(), using the F_RDLCK, F_WRLCK, and F_UNLCK constants.
2 parents 7d57bdc + 14eaaf8 commit 4f3ec99

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/unix/solaris/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,10 @@ pub const LOCK_EX: ::c_int = 2;
812812
pub const LOCK_NB: ::c_int = 4;
813813
pub const LOCK_UN: ::c_int = 8;
814814

815+
pub const F_RDLCK: ::c_short = 1;
816+
pub const F_WRLCK: ::c_short = 2;
817+
pub const F_UNLCK: ::c_short = 3;
818+
815819
pub const O_SYNC: ::c_int = 16;
816820
pub const O_NONBLOCK: ::c_int = 128;
817821

0 commit comments

Comments
 (0)