diff --git a/src/lib.rs b/src/lib.rs index 1d6a5f2768..e44376d4ea 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1188,6 +1188,10 @@ pub mod protocol { } } - pub const O_CLOEXEC: usize = syscall::flag::O_CLOEXEC; + // Literal, NOT `syscall::flag::O_CLOEXEC`: this `protocol` module is built + // standalone by relibc (default-features=false, features=["protocol"]), so + // the optional `redox_syscall`/`base`/`libc` crates are NOT linked here. + // 0x0100_0000 is exactly syscall's O_CLOEXEC value. + pub const O_CLOEXEC: usize = 0x0100_0000; pub const F_DUPFD_CLOEXEC: usize = 5; }