From 8c32faacb4e5c085c77e01bc01d89167273ddf8c Mon Sep 17 00:00:00 2001 From: Dave Huseby Date: Wed, 20 Jan 2016 16:16:32 -0800 Subject: [PATCH] Fixes #144 by defining O_ACCMODE for BSD's --- src/unix/bsd/freebsdlike/mod.rs | 1 + src/unix/bsd/openbsdlike/mod.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs index d7c99ee6..d4b0fa74 100644 --- a/src/unix/bsd/freebsdlike/mod.rs +++ b/src/unix/bsd/freebsdlike/mod.rs @@ -160,6 +160,7 @@ pub const TMP_MAX: ::c_uint = 308915776; pub const O_RDONLY: ::c_int = 0; pub const O_WRONLY: ::c_int = 1; pub const O_RDWR: ::c_int = 2; +pub const O_ACCMODE: ::c_int = 3; pub const O_APPEND: ::c_int = 8; pub const O_CREAT: ::c_int = 512; pub const O_EXCL: ::c_int = 2048; diff --git a/src/unix/bsd/openbsdlike/mod.rs b/src/unix/bsd/openbsdlike/mod.rs index b1bf2caf..d4319b2d 100644 --- a/src/unix/bsd/openbsdlike/mod.rs +++ b/src/unix/bsd/openbsdlike/mod.rs @@ -68,6 +68,7 @@ pub const L_tmpnam : ::c_uint = 1024; pub const O_RDONLY : ::c_int = 0; pub const O_WRONLY : ::c_int = 1; pub const O_RDWR : ::c_int = 2; +pub const O_ACCMODE : ::c_int = 3; pub const O_APPEND : ::c_int = 8; pub const O_CREAT : ::c_int = 512; pub const O_EXCL : ::c_int = 2048;