Skip to content

Commit 722d378

Browse files
committed
Add O_ASYNC/FASYNC to OFlags
Closes bytecodealliance#1243
1 parent 9d292d2 commit 722d378

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/backend/libc/fs/types.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,12 @@ bitflags! {
338338
#[cfg(any(linux_kernel, solarish))]
339339
const LARGEFILE = bitcast!(c::O_LARGEFILE);
340340

341+
/// `O_ASYNC`, `FASYNC`
342+
///
343+
/// Note that this flag can't be used with `open(2)`
344+
#[cfg(not(any(target_os = "haiku", solarish)))]
345+
const ASYNC = bitcast!(c::O_ASYNC);
346+
341347
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
342348
const _ = !0;
343349
}

src/backend/linux_raw/fs/types.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,11 @@ bitflags! {
257257
/// It will may be reported in return of `fcntl_getfl`, though.
258258
const LARGEFILE = linux_raw_sys::general::O_LARGEFILE;
259259

260+
/// `O_ASYNC`, `FASYNC`
261+
///
262+
/// Note that this flag can't be used with `open(2)`
263+
const ASYNC = linux_raw_sys::general::FASYNC;
264+
260265
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
261266
const _ = !0;
262267
}

0 commit comments

Comments
 (0)