From 63d1a8c160c15ef729db24d5e82b1af8540ca46f Mon Sep 17 00:00:00 2001 From: John Paul Adrian Glaubitz Date: Tue, 25 Dec 2018 21:03:13 +0100 Subject: [PATCH] Define missing F_RDLCK, F_WRLCK and F_UNLCK constants on linux-s390x These are defined in the fcntl.h glibc header on s390x systems on Linux but missing in the libc crate, so add them as they are required for the file locking API in rustc. --- src/unix/notbsd/linux/s390x.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/unix/notbsd/linux/s390x.rs b/src/unix/notbsd/linux/s390x.rs index 9196f88b..9e3814f3 100644 --- a/src/unix/notbsd/linux/s390x.rs +++ b/src/unix/notbsd/linux/s390x.rs @@ -791,6 +791,9 @@ pub const MAP_HUGETLB: ::c_int = 0x040000; pub const EFD_NONBLOCK: ::c_int = 0x800; +pub const F_RDLCK: ::c_int = 0; +pub const F_WRLCK: ::c_int = 1; +pub const F_UNLCK: ::c_int = 2; pub const F_GETLK: ::c_int = 5; pub const F_GETOWN: ::c_int = 9; pub const F_SETOWN: ::c_int = 8;