Skip to content

Commit 86dff58

Browse files
committed
Auto merge of #2210 - sunfishcode:sunfishcode/wasi-o-cloexec, r=Amanieu
Define `O_CLOEXEC` for WASI. `O_CLOEXEC` is defined to be 0 in WASI libc: https://github.com/WebAssembly/wasi-libc/blob/659ff414560721b1660a19685110e484a081c3d4/libc-bottom-half/headers/public/__header_fcntl.h#L24 so define it accordingly in Rust's `libc` bindings.
2 parents 0ea548a + a32895f commit 86dff58

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/wasi.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ pub const O_EXEC: c_int = 0x02000000;
201201
pub const O_RDONLY: c_int = 0x04000000;
202202
pub const O_SEARCH: c_int = 0x08000000;
203203
pub const O_WRONLY: c_int = 0x10000000;
204+
pub const O_CLOEXEC: c_int = 0x0;
204205
pub const O_RDWR: c_int = O_WRONLY | O_RDONLY;
205206
pub const O_ACCMODE: c_int = O_EXEC | O_RDWR | O_SEARCH;
206207
pub const O_NOCTTY: c_int = 0x0;

0 commit comments

Comments
 (0)