Skip to content

Commit d44e121

Browse files
committed
gnu: Update F_GETLK and F_GETLK64 for 64-bit time
1 parent addcd64 commit d44e121

File tree

4 files changed

+28
-4
lines changed

4 files changed

+28
-4
lines changed

src/unix/linux_like/linux/gnu/b32/arm/mod.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,13 @@ pub const MCL_ONFAULT: ::c_int = 0x0004;
341341
pub const POLLWRNORM: ::c_short = 0x100;
342342
pub const POLLWRBAND: ::c_short = 0x200;
343343

344-
pub const F_GETLK: ::c_int = 5;
344+
cfg_if! {
345+
if #[cfg(gnu_time64_abi)] {
346+
pub const F_GETLK: ::c_int = 12;
347+
} else {
348+
pub const F_GETLK: ::c_int = 5;
349+
}
350+
}
345351
pub const F_GETOWN: ::c_int = 9;
346352
pub const F_SETOWN: ::c_int = 8;
347353

src/unix/linux_like/linux/gnu/b32/mips/mod.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,13 @@ pub const MAP_HUGETLB: ::c_int = 0x080000;
708708

709709
pub const EFD_NONBLOCK: ::c_int = 0x80;
710710

711-
pub const F_GETLK: ::c_int = 14;
711+
cfg_if! {
712+
if #[cfg(gnu_time64_abi)] {
713+
pub const F_GETLK: ::c_int = 33;
714+
} else {
715+
pub const F_GETLK: ::c_int = 14;
716+
}
717+
}
712718
pub const F_GETOWN: ::c_int = 23;
713719
pub const F_SETOWN: ::c_int = 24;
714720

src/unix/linux_like/linux/gnu/b32/powerpc.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,13 @@ pub const MCL_ONFAULT: ::c_int = 0x8000;
299299
pub const POLLWRNORM: ::c_short = 0x100;
300300
pub const POLLWRBAND: ::c_short = 0x200;
301301

302-
pub const F_GETLK: ::c_int = 5;
302+
cfg_if! {
303+
if #[cfg(gnu_time64_abi)] {
304+
pub const F_GETLK: ::c_int = 12;
305+
} else {
306+
pub const F_GETLK: ::c_int = 5;
307+
}
308+
}
303309
pub const F_GETOWN: ::c_int = 9;
304310
pub const F_SETOWN: ::c_int = 8;
305311

src/unix/linux_like/linux/gnu/b32/x86/mod.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,13 @@ pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
492492
pub const SOCK_STREAM: ::c_int = 1;
493493
pub const SOCK_DGRAM: ::c_int = 2;
494494

495-
pub const F_GETLK: ::c_int = 5;
495+
cfg_if! {
496+
if #[cfg(gnu_time64_abi)] {
497+
pub const F_GETLK: ::c_int = 12;
498+
} else {
499+
pub const F_GETLK: ::c_int = 5;
500+
}
501+
}
496502
pub const F_GETOWN: ::c_int = 9;
497503
pub const F_SETOWN: ::c_int = 8;
498504

0 commit comments

Comments
 (0)