diff options
author | Joshua M. Clulow <josh@sysmgr.org> | 2021-11-22 00:50:47 -0800 |
---|---|---|
committer | Joshua M. Clulow <josh@sysmgr.org> | 2022-02-10 15:54:24 -0800 |
commit | c14a884c574d0f94b01b3379e4f20e58c547560b (patch) | |
tree | 573e012813dcef9c6fa78075635017d47e872457 | |
parent | 9c7a326a2ca554a25924f280f8b69de9a57401ec (diff) | |
download | rust-libc-c14a884c574d0f94b01b3379e4f20e58c547560b.tar.gz |
illumos: wrong values for F_OFD_*
The test suite flagged that incorrect values for some fcntl(2) constants
were added in #2083. I have fixed the values so that they are correct
for 64-bit programs, which Rust programs always are on illumos.
-rw-r--r-- | src/unix/solarish/illumos.rs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/unix/solarish/illumos.rs b/src/unix/solarish/illumos.rs index 9df3c6b3bf..b6baa4f059 100644 --- a/src/unix/solarish/illumos.rs +++ b/src/unix/solarish/illumos.rs @@ -33,11 +33,14 @@ pub const TCP_KEEPCNT: ::c_int = 35; pub const TCP_KEEPINTVL: ::c_int = 36; pub const TCP_CONGESTION: ::c_int = 37; -pub const F_OFD_GETLK: ::c_int = 50; -pub const F_OFD_SETLKL: ::c_int = 51; -pub const F_OFD_SETLKW: ::c_int = 52; -pub const F_FLOCK: ::c_int = 55; -pub const F_FLOCKW: ::c_int = 56; +// These constants are correct for 64-bit programs or 32-bit programs that are +// not using large-file mode. If Rust ever supports anything other than 64-bit +// compilation on illumos, this may require adjustment: +pub const F_OFD_GETLK: ::c_int = 47; +pub const F_OFD_SETLK: ::c_int = 48; +pub const F_OFD_SETLKW: ::c_int = 49; +pub const F_FLOCK: ::c_int = 53; +pub const F_FLOCKW: ::c_int = 54; pub const FIL_ATTACH: ::c_int = 0x1; pub const FIL_DETACH: ::c_int = 0x2; |