Skip to content

Commit 16b6c0e

Browse files
committed
Auto merge of #1186 - glaubitz:fcntl-fixes, r=alexcrichton
Define missing F_RDLCK, F_WRLCK and F_UNLCK constants on linux-mips -and s390x These are defined in the fcntl.h glibc header on MIPS and s390x systems on Linux but missing in the libc crate, so add them as they are required for the file locking API in rustc.
2 parents a4d4177 + 63d1a8c commit 16b6c0e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/unix/notbsd/linux/mips/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,9 @@ pub const MAP_HUGETLB: ::c_int = 0x080000;
537537

538538
pub const EFD_NONBLOCK: ::c_int = 0x80;
539539

540+
pub const F_RDLCK: ::c_int = 0;
541+
pub const F_WRLCK: ::c_int = 1;
542+
pub const F_UNLCK: ::c_int = 2;
540543
pub const F_GETLK: ::c_int = 14;
541544
pub const F_GETOWN: ::c_int = 23;
542545
pub const F_SETOWN: ::c_int = 24;

src/unix/notbsd/linux/s390x.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,9 @@ pub const MAP_HUGETLB: ::c_int = 0x040000;
791791

792792
pub const EFD_NONBLOCK: ::c_int = 0x800;
793793

794+
pub const F_RDLCK: ::c_int = 0;
795+
pub const F_WRLCK: ::c_int = 1;
796+
pub const F_UNLCK: ::c_int = 2;
794797
pub const F_GETLK: ::c_int = 5;
795798
pub const F_GETOWN: ::c_int = 9;
796799
pub const F_SETOWN: ::c_int = 8;

0 commit comments

Comments
 (0)