Skip to content

Commit 971a291

Browse files
committed
Add O_DIRECT for NetBSD and FreeBSD-like
1 parent 62c0993 commit 971a291

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,8 @@ pub const L_tmpnam: ::c_uint = 1024;
273273
pub const TMP_MAX: ::c_uint = 308915776;
274274

275275
pub const O_NOCTTY: ::c_int = 32768;
276+
pub const O_DIRECT: ::c_int = 0x00010000;
277+
276278
pub const S_IFIFO: mode_t = 4096;
277279
pub const S_IFCHR: mode_t = 8192;
278280
pub const S_IFBLK: mode_t = 24576;

src/unix/bsd/netbsdlike/netbsd/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ pub const O_ALT_IO: ::c_int = 0x40000;
271271
pub const O_NOSIGPIPE: ::c_int = 0x1000000;
272272
pub const O_SEARCH: ::c_int = 0x800000;
273273
pub const O_DIRECTORY: ::c_int = 0x200000;
274+
pub const O_DIRECT : ::c_int = 0x00080000;
274275

275276
pub const MS_SYNC : ::c_int = 0x4;
276277
pub const MS_INVALIDATE : ::c_int = 0x2;

0 commit comments

Comments
 (0)