blob: 47969542c8d4581614d3f5bfd4cc602484b06c5e [file] [log] [blame]
Patrick Williams8e7b46e2023-05-01 14:19:06 -05001From b87552c504b53a5e5df2438adfe24e35b0168aba Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 8 Apr 2023 08:51:02 -0700
4Subject: [PATCH] musl/riscv32: Define F_SETLK, F_SETLKW and fix F_GETLK
5
6F_SETLK and F_SETLKW were not defined therefore define them
7and F_GETLK value was not matching the musl port hence fixed
8
9Upstream-Status: Submitted [https://github.com/rust-lang/libc/pull/3191]
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 src/unix/linux_like/linux/musl/b32/riscv32/mod.rs | 6 ++++--
13 1 file changed, 4 insertions(+), 2 deletions(-)
14
15diff --git a/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs b/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs
16index 9ce6a9fd3..e56ff4853 100644
17--- a/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs
18+++ b/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs
19@@ -339,9 +339,11 @@ pub const POLLWRBAND: ::c_short = 512;
20 pub const O_ASYNC: ::c_int = 8192;
21 pub const O_NDELAY: ::c_int = 2048;
22 pub const EFD_NONBLOCK: ::c_int = 2048;
23-pub const F_GETLK: ::c_int = 5;
24-pub const F_GETOWN: ::c_int = 9;
25 pub const F_SETOWN: ::c_int = 8;
26+pub const F_GETOWN: ::c_int = 9;
27+pub const F_GETLK: ::c_int = 12;
28+pub const F_SETLK: ::c_int = 13;
29+pub const F_SETLKW: ::c_int = 14;
30 pub const SFD_NONBLOCK: ::c_int = 2048;
31 pub const TCSANOW: ::c_int = 0;
32 pub const TCSADRAIN: ::c_int = 1;
33--
342.40.0
35