Skip to content

Commit 86d6ea2

Browse files
committed
Move lockf to unix
1 parent 52ce388 commit 86d6ea2

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/unix/linux_like/mod.rs

-11
Original file line numberDiff line numberDiff line change
@@ -1209,11 +1209,6 @@ pub const SO_EE_ORIGIN_ICMP6: u8 = 3;
12091209
pub const SO_EE_ORIGIN_TXSTATUS: u8 = 4;
12101210
pub const SO_EE_ORIGIN_TIMESTAMPING: u8 = SO_EE_ORIGIN_TXSTATUS;
12111211

1212-
pub const F_ULOCK: ::c_int = 0;
1213-
pub const F_LOCK: ::c_int = 1;
1214-
pub const F_TLOCK: ::c_int = 2;
1215-
pub const F_TEST: ::c_int = 3;
1216-
12171212
const_fn! {
12181213
{const} fn CMSG_ALIGN(len: usize) -> usize {
12191214
len + ::mem::size_of::<usize>() - 1 & !(::mem::size_of::<usize>() - 1)
@@ -1580,12 +1575,6 @@ extern "C" {
15801575
flags: ::c_int,
15811576
) -> ::ssize_t;
15821577
pub fn uname(buf: *mut ::utsname) -> ::c_int;
1583-
1584-
pub fn lockf(
1585-
fd: ::c_int,
1586-
cmd: ::c_int,
1587-
len: ::off_t,
1588-
) -> ::c_int;
15891578
}
15901579

15911580
cfg_if! {

src/unix/mod.rs

+11
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,11 @@ pub const ATF_PERM: ::c_int = 0x04;
292292
pub const ATF_PUBL: ::c_int = 0x08;
293293
pub const ATF_USETRAILERS: ::c_int = 0x10;
294294

295+
pub const F_ULOCK: ::c_int = 0;
296+
pub const F_LOCK: ::c_int = 1;
297+
pub const F_TLOCK: ::c_int = 2;
298+
pub const F_TEST: ::c_int = 3;
299+
295300
cfg_if! {
296301
if #[cfg(target_os = "l4re")] {
297302
// required libraries for L4Re are linked externally, ATM
@@ -1447,6 +1452,12 @@ extern "C" {
14471452
n: *mut size_t,
14481453
stream: *mut FILE,
14491454
) -> ssize_t;
1455+
1456+
pub fn lockf(
1457+
fd: ::c_int,
1458+
cmd: ::c_int,
1459+
len: ::off_t,
1460+
) -> ::c_int;
14501461
}
14511462

14521463
cfg_if! {

0 commit comments

Comments
 (0)