Link Here
|
1 |
------------------------------------------------------------------------ |
2 |
r441843 | kib | 2017-05-27 05:06:40 -0700 (Sat, 27 May 2017) | 6 lines |
3 |
|
4 |
Fix lang/rust after ino64 src commit. |
5 |
|
6 |
Approved by: bapt, dumbbell |
7 |
Sponsored by: The FreeBSD Foundation |
8 |
Differential revision: https://reviews.freebsd.org/D10799 |
9 |
|
10 |
------------------------------------------------------------------------ |
11 |
|
12 |
commit 969ad2b73cdc928b88f6db8f31916bbe294764c0 |
13 |
Author: Bryan Drewery <bryan@shatow.net> |
14 |
Date: Thu Mar 1 12:35:01 2018 -0800 |
15 |
|
16 |
Link against kevent@FBSD_1.0 to fix ABI compat with FreeBSD12. |
17 |
|
18 |
struct kevent was modified in FreeBSD12. The @FBSD_1.0 symbol supports the old |
19 |
structure ABI still. |
20 |
|
21 |
This allows the `mio` crate tests to now pass on FreeBSD12. |
22 |
|
23 |
--- ./src/liblibc/src/unix/bsd/freebsdlike/freebsd/aarch64.rs.orig 2017-04-24 18:56:45.000000000 +0000 |
24 |
+++ ./src/liblibc/src/unix/bsd/freebsdlike/freebsd/aarch64.rs 2017-05-30 07:55:40.703709000 +0000 |
25 |
@@ -7,10 +7,12 @@ |
26 |
pub struct stat { |
27 |
pub st_dev: ::dev_t, |
28 |
pub st_ino: ::ino_t, |
29 |
- pub st_mode: ::mode_t, |
30 |
pub st_nlink: ::nlink_t, |
31 |
+ pub st_mode: ::mode_t, |
32 |
+ pub st_pad0: ::uint16_t, |
33 |
pub st_uid: ::uid_t, |
34 |
pub st_gid: ::gid_t, |
35 |
+ pub st_pad1: ::uint32_t, |
36 |
pub st_rdev: ::dev_t, |
37 |
pub st_atime: ::time_t, |
38 |
pub st_atime_nsec: ::c_long, |
39 |
@@ -18,13 +20,13 @@ |
40 |
pub st_mtime_nsec: ::c_long, |
41 |
pub st_ctime: ::time_t, |
42 |
pub st_ctime_nsec: ::c_long, |
43 |
+ pub st_birthtime: ::time_t, |
44 |
+ pub st_birthtime_nsec: ::c_long, |
45 |
pub st_size: ::off_t, |
46 |
pub st_blocks: ::blkcnt_t, |
47 |
pub st_blksize: ::blksize_t, |
48 |
pub st_flags: ::fflags_t, |
49 |
- pub st_gen: ::uint32_t, |
50 |
- pub st_lspare: ::int32_t, |
51 |
- pub st_birthtime: ::time_t, |
52 |
- pub st_birthtime_nsec: ::c_long, |
53 |
+ pub st_gen: ::uint64_t, |
54 |
+ pub st_spare: [::uint64_t; 10], |
55 |
} |
56 |
} |
57 |
--- ./src/liblibc/src/unix/bsd/freebsdlike/freebsd/mod.rs.orig 2017-04-24 18:56:45.000000000 +0000 |
58 |
+++ ./src/liblibc/src/unix/bsd/freebsdlike/freebsd/mod.rs 2017-05-25 16:28:37.280076000 +0000 |
59 |
@@ -1,8 +1,8 @@ |
60 |
pub type fflags_t = u32; |
61 |
pub type clock_t = i32; |
62 |
-pub type ino_t = u32; |
63 |
+pub type ino_t = u64; |
64 |
pub type lwpid_t = i32; |
65 |
-pub type nlink_t = u16; |
66 |
+pub type nlink_t = u64; |
67 |
pub type blksize_t = u32; |
68 |
pub type clockid_t = ::c_int; |
69 |
pub type sem_t = _sem; |
70 |
@@ -40,10 +40,13 @@ |
71 |
} |
72 |
|
73 |
pub struct dirent { |
74 |
- pub d_fileno: u32, |
75 |
+ pub d_fileno: u64, |
76 |
+ pub d_off: u64, |
77 |
pub d_reclen: u16, |
78 |
pub d_type: u8, |
79 |
- pub d_namlen: u8, |
80 |
+ pub d_pad0: u8, |
81 |
+ pub d_namlen: u16, |
82 |
+ pub d_pad1: u16, |
83 |
pub d_name: [::c_char; 256], |
84 |
} |
85 |
|
86 |
--- ./src/liblibc/src/unix/bsd/freebsdlike/freebsd/x86.rs.orig 2017-04-24 18:56:45.000000000 +0000 |
87 |
+++ ./src/liblibc/src/unix/bsd/freebsdlike/freebsd/x86.rs 2017-05-25 16:25:42.303616000 +0000 |
88 |
@@ -7,25 +7,30 @@ |
89 |
pub struct stat { |
90 |
pub st_dev: ::dev_t, |
91 |
pub st_ino: ::ino_t, |
92 |
- pub st_mode: ::mode_t, |
93 |
pub st_nlink: ::nlink_t, |
94 |
+ pub st_mode: ::mode_t, |
95 |
+ pub st_pad0: ::uint16_t, |
96 |
pub st_uid: ::uid_t, |
97 |
pub st_gid: ::gid_t, |
98 |
+ pub st_pad1: ::uint32_t, |
99 |
pub st_rdev: ::dev_t, |
100 |
+ pub st_atime_ext: ::int32_t, |
101 |
pub st_atime: ::time_t, |
102 |
pub st_atime_nsec: ::c_long, |
103 |
+ pub st_mtime_ext: ::int32_t, |
104 |
pub st_mtime: ::time_t, |
105 |
pub st_mtime_nsec: ::c_long, |
106 |
+ pub st_ctime_ext: ::int32_t, |
107 |
pub st_ctime: ::time_t, |
108 |
pub st_ctime_nsec: ::c_long, |
109 |
+ pub st_birthtime_ext: ::int32_t, |
110 |
+ pub st_birthtime: ::time_t, |
111 |
+ pub st_birthtime_nsec: ::c_long, |
112 |
pub st_size: ::off_t, |
113 |
pub st_blocks: ::blkcnt_t, |
114 |
pub st_blksize: ::blksize_t, |
115 |
pub st_flags: ::fflags_t, |
116 |
- pub st_gen: ::uint32_t, |
117 |
- pub st_lspare: ::int32_t, |
118 |
- pub st_birthtime: ::time_t, |
119 |
- pub st_birthtime_nsec: ::c_long, |
120 |
- __unused: [u8; 8], |
121 |
+ pub st_gen: ::uint64_t, |
122 |
+ pub st_spare: [::uint64_t; 10], |
123 |
} |
124 |
} |
125 |
--- ./src/liblibc/src/unix/bsd/freebsdlike/freebsd/x86_64.rs.orig 2017-04-24 18:56:45.000000000 +0000 |
126 |
+++ ./src/liblibc/src/unix/bsd/freebsdlike/freebsd/x86_64.rs 2017-05-25 16:25:42.303910000 +0000 |
127 |
@@ -7,10 +7,12 @@ |
128 |
pub struct stat { |
129 |
pub st_dev: ::dev_t, |
130 |
pub st_ino: ::ino_t, |
131 |
- pub st_mode: ::mode_t, |
132 |
pub st_nlink: ::nlink_t, |
133 |
+ pub st_mode: ::mode_t, |
134 |
+ pub st_pad0: ::uint16_t, |
135 |
pub st_uid: ::uid_t, |
136 |
pub st_gid: ::gid_t, |
137 |
+ pub st_pad1: ::uint32_t, |
138 |
pub st_rdev: ::dev_t, |
139 |
pub st_atime: ::time_t, |
140 |
pub st_atime_nsec: ::c_long, |
141 |
@@ -18,13 +20,13 @@ |
142 |
pub st_mtime_nsec: ::c_long, |
143 |
pub st_ctime: ::time_t, |
144 |
pub st_ctime_nsec: ::c_long, |
145 |
+ pub st_birthtime: ::time_t, |
146 |
+ pub st_birthtime_nsec: ::c_long, |
147 |
pub st_size: ::off_t, |
148 |
pub st_blocks: ::blkcnt_t, |
149 |
pub st_blksize: ::blksize_t, |
150 |
pub st_flags: ::fflags_t, |
151 |
- pub st_gen: ::uint32_t, |
152 |
- pub st_lspare: ::int32_t, |
153 |
- pub st_birthtime: ::time_t, |
154 |
- pub st_birthtime_nsec: ::c_long, |
155 |
+ pub st_gen: ::uint64_t, |
156 |
+ pub st_spare: [::uint64_t; 10], |
157 |
} |
158 |
} |
159 |
--- ./src/liblibc/src/unix/bsd/freebsdlike/mod.rs.orig 2017-04-24 18:56:45.000000000 +0000 |
160 |
+++ ./src/liblibc/src/unix/bsd/freebsdlike/mod.rs 2017-05-25 16:25:42.304391000 +0000 |
161 |
@@ -1,4 +1,4 @@ |
162 |
-pub type dev_t = u32; |
163 |
+pub type dev_t = u64; |
164 |
pub type mode_t = u16; |
165 |
pub type pthread_attr_t = *mut ::c_void; |
166 |
pub type rlim_t = i64; |
167 |
@@ -1052,6 +1052,7 @@ extern { |
168 |
serv: *mut ::c_char, |
169 |
servlen: ::size_t, |
170 |
flags: ::c_int) -> ::c_int; |
171 |
+ #[cfg_attr(target_os = "freebsd", link_name = "kevent@FBSD_1.0")] |
172 |
pub fn kevent(kq: ::c_int, |
173 |
changelist: *const ::kevent, |
174 |
nchanges: ::c_int, |
175 |
--- ./src/libstd/os/freebsd/raw.rs.orig 2017-04-24 18:53:46.000000000 +0000 |
176 |
+++ ./src/libstd/os/freebsd/raw.rs 2017-05-25 16:25:42.304715000 +0000 |
177 |
@@ -38,32 +38,52 @@ |
178 |
#[stable(feature = "raw_ext", since = "1.1.0")] |
179 |
pub struct stat { |
180 |
#[stable(feature = "raw_ext", since = "1.1.0")] |
181 |
- pub st_dev: u32, |
182 |
+ pub st_dev: u64, |
183 |
#[stable(feature = "raw_ext", since = "1.1.0")] |
184 |
- pub st_ino: u32, |
185 |
+ pub st_ino: u64, |
186 |
#[stable(feature = "raw_ext", since = "1.1.0")] |
187 |
+ pub st_nlink: u64, |
188 |
+ #[stable(feature = "raw_ext", since = "1.1.0")] |
189 |
pub st_mode: u16, |
190 |
#[stable(feature = "raw_ext", since = "1.1.0")] |
191 |
- pub st_nlink: u16, |
192 |
+ pub st_pad0: u16, |
193 |
#[stable(feature = "raw_ext", since = "1.1.0")] |
194 |
pub st_uid: u32, |
195 |
#[stable(feature = "raw_ext", since = "1.1.0")] |
196 |
pub st_gid: u32, |
197 |
#[stable(feature = "raw_ext", since = "1.1.0")] |
198 |
- pub st_rdev: u32, |
199 |
+ pub st_pad1: u32, |
200 |
#[stable(feature = "raw_ext", since = "1.1.0")] |
201 |
+ pub st_rdev: u64, |
202 |
+ #[cfg(target_arch = "x86")] |
203 |
+ #[stable(feature = "raw_ext", since = "1.1.0")] |
204 |
+ pub st_atime_ext: c_long, |
205 |
+ #[stable(feature = "raw_ext", since = "1.1.0")] |
206 |
pub st_atime: c_long, |
207 |
#[stable(feature = "raw_ext", since = "1.1.0")] |
208 |
pub st_atime_nsec: c_long, |
209 |
+ #[cfg(target_arch = "x86")] |
210 |
#[stable(feature = "raw_ext", since = "1.1.0")] |
211 |
+ pub st_mtime_ext: c_long, |
212 |
+ #[stable(feature = "raw_ext", since = "1.1.0")] |
213 |
pub st_mtime: c_long, |
214 |
#[stable(feature = "raw_ext", since = "1.1.0")] |
215 |
pub st_mtime_nsec: c_long, |
216 |
+ #[cfg(target_arch = "x86")] |
217 |
#[stable(feature = "raw_ext", since = "1.1.0")] |
218 |
+ pub st_ctime_ext: c_long, |
219 |
+ #[stable(feature = "raw_ext", since = "1.1.0")] |
220 |
pub st_ctime: c_long, |
221 |
#[stable(feature = "raw_ext", since = "1.1.0")] |
222 |
pub st_ctime_nsec: c_long, |
223 |
+ #[cfg(target_arch = "x86")] |
224 |
#[stable(feature = "raw_ext", since = "1.1.0")] |
225 |
+ pub st_birthtime_ext: c_long, |
226 |
+ #[stable(feature = "raw_ext", since = "1.1.0")] |
227 |
+ pub st_birthtime: c_long, |
228 |
+ #[stable(feature = "raw_ext", since = "1.1.0")] |
229 |
+ pub st_birthtime_nsec: c_long, |
230 |
+ #[stable(feature = "raw_ext", since = "1.1.0")] |
231 |
pub st_size: i64, |
232 |
#[stable(feature = "raw_ext", since = "1.1.0")] |
233 |
pub st_blocks: i64, |
234 |
@@ -72,14 +92,7 @@ |
235 |
#[stable(feature = "raw_ext", since = "1.1.0")] |
236 |
pub st_flags: u32, |
237 |
#[stable(feature = "raw_ext", since = "1.1.0")] |
238 |
- pub st_gen: u32, |
239 |
+ pub st_gen: u64, |
240 |
#[stable(feature = "raw_ext", since = "1.1.0")] |
241 |
- pub st_lspare: i32, |
242 |
- #[stable(feature = "raw_ext", since = "1.1.0")] |
243 |
- pub st_birthtime: c_long, |
244 |
- #[stable(feature = "raw_ext", since = "1.1.0")] |
245 |
- pub st_birthtime_nsec: c_long, |
246 |
- #[cfg(target_arch = "x86")] |
247 |
- #[stable(feature = "raw_ext", since = "1.1.0")] |
248 |
- pub __unused: [u8; 8], |
249 |
+ pub st_spare: [u64; 10], |
250 |
} |
251 |
--- ./src/libstd/os/freebsd/fs.rs.orig 2017-04-24 18:53:46.000000000 +0000 |
252 |
+++ ./src/libstd/os/freebsd/fs.rs 2017-05-25 16:25:42.304989000 +0000 |
253 |
@@ -74,8 +74,6 @@ |
254 |
fn st_flags(&self) -> u32; |
255 |
#[stable(feature = "metadata_ext2", since = "1.8.0")] |
256 |
fn st_gen(&self) -> u32; |
257 |
- #[stable(feature = "metadata_ext2", since = "1.8.0")] |
258 |
- fn st_lspare(&self) -> u32; |
259 |
} |
260 |
|
261 |
#[stable(feature = "metadata_ext", since = "1.1.0")] |
262 |
@@ -146,9 +144,6 @@ |
263 |
} |
264 |
fn st_flags(&self) -> u32 { |
265 |
self.as_inner().as_inner().st_flags as u32 |
266 |
- } |
267 |
- fn st_lspare(&self) -> u32 { |
268 |
- self.as_inner().as_inner().st_lspare as u32 |
269 |
} |
270 |
} |
271 |
|
272 |
--- ./src/vendor/libc/src/unix/bsd/freebsdlike/freebsd/aarch64.rs.orig 2017-04-24 20:20:26.000000000 +0000 |
273 |
+++ ./src/vendor/libc/src/unix/bsd/freebsdlike/freebsd/aarch64.rs 2017-05-30 07:57:19.874957000 +0000 |
274 |
@@ -7,10 +7,12 @@ |
275 |
pub struct stat { |
276 |
pub st_dev: ::dev_t, |
277 |
pub st_ino: ::ino_t, |
278 |
- pub st_mode: ::mode_t, |
279 |
pub st_nlink: ::nlink_t, |
280 |
+ pub st_mode: ::mode_t, |
281 |
+ pub st_pad0: ::uint16_t, |
282 |
pub st_uid: ::uid_t, |
283 |
pub st_gid: ::gid_t, |
284 |
+ pub st_pad1: ::uint32_t, |
285 |
pub st_rdev: ::dev_t, |
286 |
pub st_atime: ::time_t, |
287 |
pub st_atime_nsec: ::c_long, |
288 |
@@ -18,13 +20,13 @@ |
289 |
pub st_mtime_nsec: ::c_long, |
290 |
pub st_ctime: ::time_t, |
291 |
pub st_ctime_nsec: ::c_long, |
292 |
+ pub st_birthtime: ::time_t, |
293 |
+ pub st_birthtime_nsec: ::c_long, |
294 |
pub st_size: ::off_t, |
295 |
pub st_blocks: ::blkcnt_t, |
296 |
pub st_blksize: ::blksize_t, |
297 |
pub st_flags: ::fflags_t, |
298 |
- pub st_gen: ::uint32_t, |
299 |
- pub st_lspare: ::int32_t, |
300 |
- pub st_birthtime: ::time_t, |
301 |
- pub st_birthtime_nsec: ::c_long, |
302 |
+ pub st_gen: ::uint64_t, |
303 |
+ pub st_spare: [::uint64_t; 10], |
304 |
} |
305 |
} |
306 |
--- ./src/vendor/libc/src/unix/bsd/freebsdlike/freebsd/x86_64.rs.orig 2017-04-24 20:20:26.000000000 +0000 |
307 |
+++ ./src/vendor/libc/src/unix/bsd/freebsdlike/freebsd/x86_64.rs 2017-05-25 16:25:42.305261000 +0000 |
308 |
@@ -7,10 +7,12 @@ |
309 |
pub struct stat { |
310 |
pub st_dev: ::dev_t, |
311 |
pub st_ino: ::ino_t, |
312 |
- pub st_mode: ::mode_t, |
313 |
pub st_nlink: ::nlink_t, |
314 |
+ pub st_mode: ::mode_t, |
315 |
+ pub st_pad0: ::uint16_t, |
316 |
pub st_uid: ::uid_t, |
317 |
pub st_gid: ::gid_t, |
318 |
+ pub st_pad1: ::uint32_t, |
319 |
pub st_rdev: ::dev_t, |
320 |
pub st_atime: ::time_t, |
321 |
pub st_atime_nsec: ::c_long, |
322 |
@@ -18,13 +20,13 @@ |
323 |
pub st_mtime_nsec: ::c_long, |
324 |
pub st_ctime: ::time_t, |
325 |
pub st_ctime_nsec: ::c_long, |
326 |
+ pub st_birthtime: ::time_t, |
327 |
+ pub st_birthtime_nsec: ::c_long, |
328 |
pub st_size: ::off_t, |
329 |
pub st_blocks: ::blkcnt_t, |
330 |
pub st_blksize: ::blksize_t, |
331 |
pub st_flags: ::fflags_t, |
332 |
- pub st_gen: ::uint32_t, |
333 |
- pub st_lspare: ::int32_t, |
334 |
- pub st_birthtime: ::time_t, |
335 |
- pub st_birthtime_nsec: ::c_long, |
336 |
+ pub st_gen: ::uint64_t, |
337 |
+ pub st_spare: [::uint64_t; 10], |
338 |
} |
339 |
} |
340 |
--- ./src/vendor/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs.orig 2017-04-24 20:20:26.000000000 +0000 |
341 |
+++ ./src/vendor/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs 2017-05-25 16:28:29.708287000 +0000 |
342 |
@@ -1,8 +1,8 @@ |
343 |
pub type fflags_t = u32; |
344 |
pub type clock_t = i32; |
345 |
-pub type ino_t = u32; |
346 |
+pub type ino_t = u64; |
347 |
pub type lwpid_t = i32; |
348 |
-pub type nlink_t = u16; |
349 |
+pub type nlink_t = u64; |
350 |
pub type blksize_t = u32; |
351 |
pub type clockid_t = ::c_int; |
352 |
pub type sem_t = _sem; |
353 |
@@ -40,10 +40,13 @@ |
354 |
} |
355 |
|
356 |
pub struct dirent { |
357 |
- pub d_fileno: u32, |
358 |
+ pub d_fileno: u64, |
359 |
+ pub d_off: u64, |
360 |
pub d_reclen: u16, |
361 |
pub d_type: u8, |
362 |
- pub d_namlen: u8, |
363 |
+ pub d_pad0: u8, |
364 |
+ pub d_namlen: u16, |
365 |
+ pub d_pad1: u16, |
366 |
pub d_name: [::c_char; 256], |
367 |
} |
368 |
|
369 |
--- ./src/vendor/libc/src/unix/bsd/freebsdlike/freebsd/x86.rs.orig 2017-04-24 20:20:26.000000000 +0000 |
370 |
+++ ./src/vendor/libc/src/unix/bsd/freebsdlike/freebsd/x86.rs 2017-05-25 16:25:42.305967000 +0000 |
371 |
@@ -7,25 +7,30 @@ |
372 |
pub struct stat { |
373 |
pub st_dev: ::dev_t, |
374 |
pub st_ino: ::ino_t, |
375 |
- pub st_mode: ::mode_t, |
376 |
pub st_nlink: ::nlink_t, |
377 |
+ pub st_mode: ::mode_t, |
378 |
+ pub st_pad0: ::uint16_t, |
379 |
pub st_uid: ::uid_t, |
380 |
pub st_gid: ::gid_t, |
381 |
+ pub st_pad1: ::uint32_t, |
382 |
pub st_rdev: ::dev_t, |
383 |
+ pub st_atime_ext: ::int32_t, |
384 |
pub st_atime: ::time_t, |
385 |
pub st_atime_nsec: ::c_long, |
386 |
+ pub st_mtime_ext: i32, |
387 |
pub st_mtime: ::time_t, |
388 |
pub st_mtime_nsec: ::c_long, |
389 |
+ pub st_ctime_ext: ::int32_t, |
390 |
pub st_ctime: ::time_t, |
391 |
pub st_ctime_nsec: ::c_long, |
392 |
+ pub st_birthtime_ext: ::int32_t, |
393 |
+ pub st_birthtime: ::time_t, |
394 |
+ pub st_birthtime_nsec: ::c_long, |
395 |
pub st_size: ::off_t, |
396 |
pub st_blocks: ::blkcnt_t, |
397 |
pub st_blksize: ::blksize_t, |
398 |
pub st_flags: ::fflags_t, |
399 |
- pub st_gen: ::uint32_t, |
400 |
- pub st_lspare: ::int32_t, |
401 |
- pub st_birthtime: ::time_t, |
402 |
- pub st_birthtime_nsec: ::c_long, |
403 |
- __unused: [u8; 8], |
404 |
+ pub st_gen: ::uint64_t, |
405 |
+ pub st_spare: [::uint64_t; 10], |
406 |
} |
407 |
} |
408 |
--- ./src/vendor/libc/src/unix/bsd/freebsdlike/mod.rs.orig 2017-04-24 20:20:26.000000000 +0000 |
409 |
+++ ./src/vendor/libc/src/unix/bsd/freebsdlike/mod.rs 2017-05-25 16:25:42.306480000 +0000 |
410 |
@@ -1,4 +1,4 @@ |
411 |
-pub type dev_t = u32; |
412 |
+pub type dev_t = u64; |
413 |
pub type mode_t = u16; |
414 |
pub type pthread_attr_t = *mut ::c_void; |
415 |
pub type rlim_t = i64; |
416 |
@@ -1052,6 +1052,7 @@ extern { |
417 |
serv: *mut ::c_char, |
418 |
servlen: ::size_t, |
419 |
flags: ::c_int) -> ::c_int; |
420 |
+ #[cfg_attr(target_os = "freebsd", link_name = "kevent@FBSD_1.0")] |
421 |
pub fn kevent(kq: ::c_int, |
422 |
changelist: *const ::kevent, |
423 |
nchanges: ::c_int, |