summaryrefslogtreecommitdiff
path: root/user/rust/0031-liblibc-1b130d4c349d.patch
blob: 29087689b8ae9e5360e01f9d42924d88615713a8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
From 1b130d4c349d35da9aeb07ce020cbf96755e8a6b Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Thu, 1 Nov 2018 03:37:18 +0000
Subject: [PATCH] Add F_RDLCK/F_WRLCK/F_UNLCK to several platforms

These are used by the flock wrapper in rustc_data_structures. The
constants were already present in x86_64-linux-gnu and BSD (since
4928bd986907).
---
 src/unix/haiku/mod.rs                        | 4 ++++
 src/unix/notbsd/android/mod.rs               | 4 ++++
 src/unix/notbsd/linux/musl/mod.rs            | 4 ++++
 src/unix/notbsd/linux/other/b32/mod.rs       | 4 ++++
 src/unix/notbsd/linux/other/b64/aarch64.rs   | 4 ++++
 src/unix/notbsd/linux/other/b64/powerpc64.rs | 4 ++++
 src/unix/notbsd/linux/other/b64/sparc64.rs   | 4 ++++
 7 files changed, 28 insertions(+)

diff --git a/src/liblibc/src/unix/haiku/mod.rs b/src/liblibc/src/unix/haiku/mod.rs
index 2ef36f8f3..307a5a40d 100644
--- a/src/liblibc/src/unix/haiku/mod.rs
+++ b/src/liblibc/src/unix/haiku/mod.rs
@@ -351,6 +351,10 @@ pub const F_SETLK: ::c_int = 0x0080;
 pub const F_SETLKW: ::c_int = 0x0100;
 pub const F_DUPFD_CLOEXEC: ::c_int = 0x0200;
 
+pub const F_RDLCK: ::c_int = 0x0040;
+pub const F_UNLCK: ::c_int = 0x0200;
+pub const F_WRLCK: ::c_int = 0x0400;
+
 pub const AT_FDCWD: ::c_int = -1;
 pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x01;
 pub const AT_SYMLINK_FOLLOW: ::c_int = 0x02;
diff --git a/src/liblibc/src/unix/notbsd/android/mod.rs b/src/liblibc/src/unix/notbsd/android/mod.rs
index 3e10acd50..5b750b2b1 100644
--- a/src/liblibc/src/unix/notbsd/android/mod.rs
+++ b/src/liblibc/src/unix/notbsd/android/mod.rs
@@ -744,6 +744,10 @@ pub const F_SETOWN: ::c_int = 8;
 pub const F_SETLK: ::c_int = 6;
 pub const F_SETLKW: ::c_int = 7;
 
+pub const F_RDLCK: ::c_int = 0;
+pub const F_WRLCK: ::c_int = 1;
+pub const F_UNLCK: ::c_int = 2;
+
 pub const TCGETS: ::c_int = 0x5401;
 pub const TCSETS: ::c_int = 0x5402;
 pub const TCSETSW: ::c_int = 0x5403;
diff --git a/src/liblibc/src/unix/notbsd/linux/musl/mod.rs b/src/liblibc/src/unix/notbsd/linux/musl/mod.rs
index 10d61ebeb..9c669d9b4 100644
--- a/src/liblibc/src/unix/notbsd/linux/musl/mod.rs
+++ b/src/liblibc/src/unix/notbsd/linux/musl/mod.rs
@@ -121,6 +121,10 @@ pub const ECOMM: ::c_int = 70;
 pub const EPROTO: ::c_int = 71;
 pub const EDOTDOT: ::c_int = 73;
 
+pub const F_RDLCK: ::c_int = 0;
+pub const F_WRLCK: ::c_int = 1;
+pub const F_UNLCK: ::c_int = 2;
+
 pub const SA_NODEFER: ::c_int = 0x40000000;
 pub const SA_RESETHAND: ::c_int = 0x80000000;
 pub const SA_RESTART: ::c_int = 0x10000000;
diff --git a/src/liblibc/src/unix/notbsd/linux/other/b32/mod.rs b/src/liblibc/src/unix/notbsd/linux/other/b32/mod.rs
index 5b0142ab8..d078f7537 100644
--- a/src/liblibc/src/unix/notbsd/linux/other/b32/mod.rs
+++ b/src/liblibc/src/unix/notbsd/linux/other/b32/mod.rs
@@ -251,6 +251,10 @@ pub const F_SETOWN: ::c_int = 8;
 pub const F_SETLK: ::c_int = 6;
 pub const F_SETLKW: ::c_int = 7;
 
+pub const F_RDLCK: ::c_int = 0;
+pub const F_WRLCK: ::c_int = 1;
+pub const F_UNLCK: ::c_int = 2;
+
 pub const SFD_NONBLOCK: ::c_int = 0x0800;
 
 pub const TIOCEXCL: ::c_ulong = 0x540C;
diff --git a/src/liblibc/src/unix/notbsd/linux/other/b64/aarch64.rs b/src/liblibc/src/unix/notbsd/linux/other/b64/aarch64.rs
index 2ba27a72b..171d904ca 100644
--- a/src/liblibc/src/unix/notbsd/linux/other/b64/aarch64.rs
+++ b/src/liblibc/src/unix/notbsd/linux/other/b64/aarch64.rs
@@ -340,6 +340,10 @@ pub const F_SETOWN: ::c_int = 8;
 pub const F_SETLK: ::c_int = 6;
 pub const F_SETLKW: ::c_int = 7;
 
+pub const F_RDLCK: ::c_int = 0;
+pub const F_WRLCK: ::c_int = 1;
+pub const F_UNLCK: ::c_int = 2;
+
 pub const SFD_NONBLOCK: ::c_int = 0x0800;
 
 pub const TIOCEXCL: ::c_ulong = 0x540C;
diff --git a/src/liblibc/src/unix/notbsd/linux/other/b64/powerpc64.rs b/src/liblibc/src/unix/notbsd/linux/other/b64/powerpc64.rs
index 9dd91f0fd..1813413b0 100644
--- a/src/liblibc/src/unix/notbsd/linux/other/b64/powerpc64.rs
+++ b/src/liblibc/src/unix/notbsd/linux/other/b64/powerpc64.rs
@@ -327,6 +327,10 @@ pub const F_SETOWN: ::c_int = 8;
 pub const F_SETLK: ::c_int = 6;
 pub const F_SETLKW: ::c_int = 7;
 
+pub const F_RDLCK: ::c_int = 0;
+pub const F_WRLCK: ::c_int = 1;
+pub const F_UNLCK: ::c_int = 2;
+
 pub const SFD_NONBLOCK: ::c_int = 0x0800;
 
 pub const TIOCEXCL: ::c_ulong = 0x540C;
diff --git a/src/liblibc/src/unix/notbsd/linux/other/b64/sparc64.rs b/src/liblibc/src/unix/notbsd/linux/other/b64/sparc64.rs
index 34438a735..a3251ec7b 100644
--- a/src/liblibc/src/unix/notbsd/linux/other/b64/sparc64.rs
+++ b/src/liblibc/src/unix/notbsd/linux/other/b64/sparc64.rs
@@ -305,6 +305,10 @@ pub const F_SETOWN: ::c_int = 6;
 pub const F_SETLK: ::c_int = 8;
 pub const F_SETLKW: ::c_int = 9;
 
+pub const F_RDLCK: ::c_int = 1;
+pub const F_WRLCK: ::c_int = 2;
+pub const F_UNLCK: ::c_int = 3;
+
 pub const SFD_NONBLOCK: ::c_int = 0x4000;
 
 pub const TIOCEXCL: ::c_ulong = 0x2000740d;
-- 
2.18.0