Skip to content

Commit af77843

Browse files
committed
Merge pull request rust-lang#145 from dhuseby/fixing_O_ACCMODE
Fixes rust-lang#144 by defining O_ACCMODE for BSD's
2 parents f8da228 + 8c32faa commit af77843

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ pub const TMP_MAX: ::c_uint = 308915776;
160160
pub const O_RDONLY: ::c_int = 0;
161161
pub const O_WRONLY: ::c_int = 1;
162162
pub const O_RDWR: ::c_int = 2;
163+
pub const O_ACCMODE: ::c_int = 3;
163164
pub const O_APPEND: ::c_int = 8;
164165
pub const O_CREAT: ::c_int = 512;
165166
pub const O_EXCL: ::c_int = 2048;

src/unix/bsd/openbsdlike/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ pub const L_tmpnam : ::c_uint = 1024;
6868
pub const O_RDONLY : ::c_int = 0;
6969
pub const O_WRONLY : ::c_int = 1;
7070
pub const O_RDWR : ::c_int = 2;
71+
pub const O_ACCMODE : ::c_int = 3;
7172
pub const O_APPEND : ::c_int = 8;
7273
pub const O_CREAT : ::c_int = 512;
7374
pub const O_EXCL : ::c_int = 2048;

0 commit comments

Comments
 (0)