File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change 1919) ]
2020#![ cfg_attr( libc_deny_warnings, deny( warnings) ) ]
2121// Attributes needed when building as part of the standard library
22- #![ allow( internal_features) ]
2322#![ cfg_attr( feature = "rustc-dep-of-std" , feature( link_cfg, no_core) ) ]
2423// Enable extra lints:
2524#![ cfg_attr( feature = "extra_traits" , deny( missing_debug_implementations) ) ]
Original file line number Diff line number Diff line change @@ -952,6 +952,13 @@ pub const F_GETLK: ::c_int = 7;
952952pub const F_SETLK : :: c_int = 8 ;
953953pub const F_SETLKW : :: c_int = 9 ;
954954pub const F_DUPFD_CLOEXEC : :: c_int = 14 ;
955+ pub const F_RDLCK : :: c_int = 1 ;
956+ pub const F_WRLCK : :: c_int = 2 ;
957+ pub const F_UNLCK : :: c_int = 3 ;
958+ pub const LOCK_SH : :: c_int = 1 ;
959+ pub const LOCK_EX : :: c_int = 2 ;
960+ pub const LOCK_NB : :: c_int = 4 ;
961+ pub const LOCK_UN : :: c_int = 8 ;
955962
956963// signal.h
957964pub const SIG_DFL : sighandler_t = 0 as sighandler_t ;
@@ -2022,15 +2029,6 @@ pub unsafe fn posix_memalign(
20222029 }
20232030}
20242031
2025- pub const LOCK_SH : :: c_int = 1 ;
2026- pub const LOCK_EX : :: c_int = 2 ;
2027- pub const LOCK_NB : :: c_int = 4 ;
2028- pub const LOCK_UN : :: c_int = 8 ;
2029-
2030- pub const F_RDLCK : :: c_int = 1 ;
2031- pub const F_WRLCK : :: c_int = 2 ;
2032- pub const F_UNLCK : :: c_int = 3 ;
2033-
20342032pub unsafe fn flock ( fd : :: c_int , operation : :: c_int ) -> :: c_int {
20352033 let lock_type = match operation & !LOCK_NB {
20362034 LOCK_SH => F_RDLCK ,
You can’t perform that action at this time.
0 commit comments