File tree 2 files changed +7
-10
lines changed
2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change 19
19
) ]
20
20
#![ cfg_attr( libc_deny_warnings, deny( warnings) ) ]
21
21
// Attributes needed when building as part of the standard library
22
- #![ allow( internal_features) ]
23
22
#![ cfg_attr( feature = "rustc-dep-of-std" , feature( link_cfg, no_core) ) ]
24
23
// Enable extra lints:
25
24
#![ 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;
952
952
pub const F_SETLK : :: c_int = 8 ;
953
953
pub const F_SETLKW : :: c_int = 9 ;
954
954
pub 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 ;
955
962
956
963
// signal.h
957
964
pub const SIG_DFL : sighandler_t = 0 as sighandler_t ;
@@ -2022,15 +2029,6 @@ pub unsafe fn posix_memalign(
2022
2029
}
2023
2030
}
2024
2031
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
-
2034
2032
pub unsafe fn flock ( fd : :: c_int , operation : :: c_int ) -> :: c_int {
2035
2033
let lock_type = match operation & !LOCK_NB {
2036
2034
LOCK_SH => F_RDLCK ,
You can’t perform that action at this time.
0 commit comments