Skip to content

Commit 62c0993

Browse files
committed
Add O_DIRECTORY for FreeBSD, DragonFly, and OpenBSD-like
1 parent b88c8f5 commit 62c0993

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

src/unix/bsd/freebsdlike/dragonfly/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ pub const PTHREAD_STACK_MIN: ::size_t = 1024;
138138
pub const SIGSTKSZ: ::size_t = 40960;
139139
pub const MADV_INVAL: ::c_int = 10;
140140
pub const O_CLOEXEC: ::c_int = 0x00020000;
141+
pub const O_DIRECTORY: ::c_int = 0x08000000;
141142
pub const F_GETLK: ::c_int = 7;
142143
pub const F_SETLK: ::c_int = 8;
143144
pub const F_SETLKW: ::c_int = 9;

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ pub const SF_NODISKIO: ::c_int = 0x00000001;
139139
pub const SF_MNOWAIT: ::c_int = 0x00000002;
140140
pub const SF_SYNC: ::c_int = 0x00000004;
141141
pub const O_CLOEXEC: ::c_int = 0x00100000;
142+
pub const O_DIRECTORY: ::c_int = 0x00020000;
142143
pub const F_GETLK: ::c_int = 11;
143144
pub const F_SETLK: ::c_int = 12;
144145
pub const F_SETLKW: ::c_int = 13;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ pub const UT_LINESIZE: usize = 8;
140140
pub const UT_HOSTSIZE: usize = 256;
141141

142142
pub const O_CLOEXEC: ::c_int = 0x10000;
143+
pub const O_DIRECTORY: ::c_int = 0x20000;
143144

144145
pub const MS_SYNC : ::c_int = 0x0002;
145146
pub const MS_INVALIDATE : ::c_int = 0x0004;

0 commit comments

Comments
 (0)