From aa8b14e10797d732f2170b2704c7f5270d42f2ca Mon Sep 17 00:00:00 2001 From: Tom Almeida Date: Thu, 15 Mar 2018 15:21:02 +0800 Subject: [PATCH] Added some constants in linux for file modes --- src/fcntl/src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/fcntl/src/lib.rs b/src/fcntl/src/lib.rs index 0e5048277a..dc29bb99b4 100644 --- a/src/fcntl/src/lib.rs +++ b/src/fcntl/src/lib.rs @@ -18,6 +18,12 @@ pub const O_CREAT: c_int = 0x0040; pub const O_TRUNC: c_int = 0x0200; #[cfg(target_os = "linux")] pub const O_ACCMODE: c_int = O_RDONLY | O_WRONLY | O_RDWR; +#[cfg(target_os = "linux")] +pub const O_APPEND: c_int = 0o2000; +#[cfg(target_os = "linux")] +pub const O_CLOEXEC: c_int = 0o2_000_000; +#[cfg(target_os = "linux")] +pub const O_EXCL: c_int = 0o200; #[cfg(target_os = "redox")] pub const O_RDONLY: c_int = 0x0001_0000;