Skip to content

Commit 4d0890c

Browse files
authored
add O_DIRECT flag (#527)
1 parent d9429b5 commit 4d0890c

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/backend/libc/fs/types.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,17 @@ bitflags! {
259259
target_os = "linux",
260260
))]
261261
const NOATIME = c::O_NOATIME;
262+
263+
/// `O_DIRECT`
264+
#[cfg(any(
265+
target_os = "android",
266+
target_os = "emscripten",
267+
target_os = "freebsd",
268+
target_os = "fuchsia",
269+
target_os = "linux",
270+
target_os = "netbsd",
271+
))]
272+
const DIRECT = c::O_DIRECT;
262273
}
263274
}
264275

src/backend/linux_raw/fs/types.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,9 @@ bitflags! {
198198

199199
/// `O_NOATIME`
200200
const NOATIME = linux_raw_sys::general::O_NOATIME;
201+
202+
/// `O_DIRECT`
203+
const DIRECT = linux_raw_sys::general::O_DIRECT;
201204
}
202205
}
203206

0 commit comments

Comments
 (0)