libredox: reference syscall::flag::O_CLOEXEC instead of duplicating
O_CLOEXEC was defined in both libredox (0x0100_0000) and syscall (0x0100_0000). Per the Single Source of Truth principle (and the Local Fork Supremacy Policy: 'never version-string-duplicate a Cat 2 fork crate'), a primitive constant should be defined once in the most-primitive crate that has it (syscall) and re-exported by higher-level crates (libredox). Change: libredox::flag::O_CLOEXEC is now 'syscall::flag::O_CLOEXEC' instead of a literal 0x0100_0000. The F_DUPFD_CLOEXEC constant stays as a literal since syscall does not define it (it's a Linux-specific fcntl flag that Redox may not need).
This commit is contained in:
+1
-1
@@ -1188,6 +1188,6 @@ pub mod protocol {
|
||||
}
|
||||
}
|
||||
|
||||
pub const O_CLOEXEC: usize = 0x0100_0000;
|
||||
pub const O_CLOEXEC: usize = syscall::flag::O_CLOEXEC;
|
||||
pub const F_DUPFD_CLOEXEC: usize = 5;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user