Skip to content

Commit 21dd4e2

Browse files
committed
Auto merge of #26546 - agrover:add_flock, r=alexcrichton
flock(2) is in bsd44. Add its fn definition and constants.
2 parents e2c273f + 0f1e514 commit 21dd4e2

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/liblibc/lib.rs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3600,6 +3600,11 @@ pub mod consts {
36003600
pub const SHUT_RD: c_int = 0;
36013601
pub const SHUT_WR: c_int = 1;
36023602
pub const SHUT_RDWR: c_int = 2;
3603+
3604+
pub const LOCK_SH: c_int = 1;
3605+
pub const LOCK_EX: c_int = 2;
3606+
pub const LOCK_NB: c_int = 4;
3607+
pub const LOCK_UN: c_int = 8;
36033608
}
36043609
#[cfg(any(target_arch = "mips",
36053610
target_arch = "mipsel"))]
@@ -3684,6 +3689,11 @@ pub mod consts {
36843689
pub const SHUT_RD: c_int = 0;
36853690
pub const SHUT_WR: c_int = 1;
36863691
pub const SHUT_RDWR: c_int = 2;
3692+
3693+
pub const LOCK_SH: c_int = 1;
3694+
pub const LOCK_EX: c_int = 2;
3695+
pub const LOCK_NB: c_int = 4;
3696+
pub const LOCK_UN: c_int = 8;
36873697
}
36883698
#[cfg(any(target_arch = "x86",
36893699
target_arch = "x86_64",
@@ -4227,6 +4237,11 @@ pub mod consts {
42274237
pub const SHUT_RD: c_int = 0;
42284238
pub const SHUT_WR: c_int = 1;
42294239
pub const SHUT_RDWR: c_int = 2;
4240+
4241+
pub const LOCK_SH: c_int = 1;
4242+
pub const LOCK_EX: c_int = 2;
4243+
pub const LOCK_NB: c_int = 4;
4244+
pub const LOCK_UN: c_int = 8;
42304245
}
42314246
pub mod extra {
42324247
use types::os::arch::c95::c_int;
@@ -4651,6 +4666,11 @@ pub mod consts {
46514666
pub const SHUT_RD: c_int = 0;
46524667
pub const SHUT_WR: c_int = 1;
46534668
pub const SHUT_RDWR: c_int = 2;
4669+
4670+
pub const LOCK_SH: c_int = 1;
4671+
pub const LOCK_EX: c_int = 2;
4672+
pub const LOCK_NB: c_int = 4;
4673+
pub const LOCK_UN: c_int = 8;
46544674
}
46554675
pub mod extra {
46564676
use types::os::arch::c95::c_int;
@@ -5092,6 +5112,11 @@ pub mod consts {
50925112
pub const SHUT_RD: c_int = 0;
50935113
pub const SHUT_WR: c_int = 1;
50945114
pub const SHUT_RDWR: c_int = 2;
5115+
5116+
pub const LOCK_SH: c_int = 1;
5117+
pub const LOCK_EX: c_int = 2;
5118+
pub const LOCK_NB: c_int = 4;
5119+
pub const LOCK_UN: c_int = 8;
50955120
}
50965121
pub mod extra {
50975122
use types::os::arch::c95::c_int;
@@ -6121,6 +6146,7 @@ pub mod funcs {
61216146
-> c_int;
61226147
pub fn realpath(pathname: *const c_char, resolved: *mut c_char)
61236148
-> *mut c_char;
6149+
pub fn flock(fd: c_int, operation: c_int) -> c_int;
61246150
}
61256151
}
61266152

@@ -6137,6 +6163,7 @@ pub mod funcs {
61376163
-> c_int;
61386164
pub fn mincore(addr: *mut c_void, len: size_t, vec: *mut c_uchar)
61396165
-> c_int;
6166+
pub fn flock(fd: c_int, operation: c_int) -> c_int;
61406167
}
61416168
}
61426169

0 commit comments

Comments
 (0)