summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Huseby <dhuseby@mozilla.com>2016-01-20 16:16:32 -0800
committerDave Huseby <dhuseby@mozilla.com>2016-01-20 16:16:32 -0800
commit8c32faacb4e5c085c77e01bc01d89167273ddf8c (patch)
treeb5db3d585ebf7cad1a44691a09fbc57609f8e7ae
parentf8da228335d2f70aea9fc6e0ef7b8ee66bbabf2a (diff)
downloadrust-libc-8c32faacb4e5c085c77e01bc01d89167273ddf8c.tar.gz
Fixes #144 by defining O_ACCMODE for BSD's
-rw-r--r--src/unix/bsd/freebsdlike/mod.rs1
-rw-r--r--src/unix/bsd/openbsdlike/mod.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs
index d7c99ee61f..d4b0fa74b2 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 b1bf2cafe1..d4319b2d56 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;