Skip to content

Commit b4e8e5d

Browse files
jclulowpfmooney
authored andcommitted
illumos: wrong values for F_OFD_*
The test suite flagged that incorrect values for some fcntl(2) constants were added in rust-lang#2083. I have fixed the values so that they are correct for 64-bit programs, which Rust programs always are on illumos.
1 parent b2cd590 commit b4e8e5d

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/unix/solarish/illumos.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,14 @@ pub const TCP_KEEPCNT: ::c_int = 35;
3333
pub const TCP_KEEPINTVL: ::c_int = 36;
3434
pub const TCP_CONGESTION: ::c_int = 37;
3535

36-
pub const F_OFD_GETLK: ::c_int = 50;
37-
pub const F_OFD_SETLKL: ::c_int = 51;
38-
pub const F_OFD_SETLKW: ::c_int = 52;
39-
pub const F_FLOCK: ::c_int = 55;
40-
pub const F_FLOCKW: ::c_int = 56;
36+
// These constants are correct for 64-bit programs or 32-bit programs that are
37+
// not using large-file mode. If Rust ever supports anything other than 64-bit
38+
// compilation on illumos, this may require adjustment:
39+
pub const F_OFD_GETLK: ::c_int = 47;
40+
pub const F_OFD_SETLK: ::c_int = 48;
41+
pub const F_OFD_SETLKW: ::c_int = 49;
42+
pub const F_FLOCK: ::c_int = 53;
43+
pub const F_FLOCKW: ::c_int = 54;
4144

4245
pub const FIL_ATTACH: ::c_int = 0x1;
4346
pub const FIL_DETACH: ::c_int = 0x2;

0 commit comments

Comments
 (0)