libredox: revert O_CLOEXEC to literal in protocol module (fixes standalone build)
Commit 65889db changed protocol::O_CLOEXEC to reference syscall::flag::O_CLOEXEC,
but the `protocol` module is built standalone by relibc
(default-features=false, features=["protocol"]), where the optional
redox_syscall/base/libc crates are NOT linked. That produced E0433
'unresolved module or unlinked crate syscall' and failed the relibc/prefix
build. Every other syscall:: use in libredox is #[cfg(feature="redox_syscall")]
-gated; this const was not. 0x0100_0000 is exactly syscall's O_CLOEXEC value, so
the literal is correct (the single-source-of-truth concern is cosmetic here).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+5
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user