@@ -167,13 +167,16 @@ impl FileDesc {
167
167
}
168
168
169
169
#[ cfg( any(
170
+ target_os = "aix" ,
171
+ target_os = "dragonfly" , // DragonFly 1.5
170
172
target_os = "emscripten" ,
171
173
target_os = "freebsd" ,
172
174
target_os = "fuchsia" ,
173
175
target_os = "hurd" ,
174
176
target_os = "illumos" ,
175
177
target_os = "linux" ,
176
178
target_os = "netbsd" ,
179
+ target_os = "openbsd" , // OpenBSD 2.7
177
180
) ) ]
178
181
pub fn read_vectored_at ( & self , bufs : & mut [ IoSliceMut < ' _ > ] , offset : u64 ) -> io:: Result < usize > {
179
182
let ret = cvt ( unsafe {
@@ -188,7 +191,9 @@ impl FileDesc {
188
191
}
189
192
190
193
#[ cfg( not( any(
194
+ target_os = "aix" ,
191
195
target_os = "android" ,
196
+ target_os = "dragonfly" ,
192
197
target_os = "emscripten" ,
193
198
target_os = "freebsd" ,
194
199
target_os = "fuchsia" ,
@@ -199,6 +204,8 @@ impl FileDesc {
199
204
target_os = "linux" ,
200
205
target_os = "macos" ,
201
206
target_os = "netbsd" ,
207
+ target_os = "openbsd" ,
208
+ target_os = "watchos" ,
202
209
) ) ) ]
203
210
pub fn read_vectored_at ( & self , bufs : & mut [ IoSliceMut < ' _ > ] , offset : u64 ) -> io:: Result < usize > {
204
211
io:: default_read_vectored ( |b| self . read_at ( b, offset) , bufs)
@@ -236,9 +243,10 @@ impl FileDesc {
236
243
// no `syscall` possible in these platform.
237
244
#[ cfg( any(
238
245
all( target_os = "android" , target_pointer_width = "32" ) ,
239
- target_os = "ios" ,
240
- target_os = "tvos" ,
241
- target_os = "macos" ,
246
+ target_os = "ios" , // ios 14.0
247
+ target_os = "tvos" , // tvos 14.0
248
+ target_os = "macos" , // macos 11.0
249
+ target_os = "watchos" , // watchos 7.0
242
250
) ) ]
243
251
pub fn read_vectored_at ( & self , bufs : & mut [ IoSliceMut < ' _ > ] , offset : u64 ) -> io:: Result < usize > {
244
252
super :: weak:: weak!( fn preadv64( libc:: c_int, * const libc:: iovec, libc:: c_int, off64_t) -> isize ) ;
@@ -318,13 +326,16 @@ impl FileDesc {
318
326
}
319
327
320
328
#[ cfg( any(
329
+ target_os = "aix" ,
330
+ target_os = "dragonfly" , // DragonFly 1.5
321
331
target_os = "emscripten" ,
322
332
target_os = "freebsd" ,
323
333
target_os = "fuchsia" ,
324
334
target_os = "hurd" ,
325
335
target_os = "illumos" ,
326
336
target_os = "linux" ,
327
337
target_os = "netbsd" ,
338
+ target_os = "openbsd" , // OpenBSD 2.7
328
339
) ) ]
329
340
pub fn write_vectored_at ( & self , bufs : & [ IoSlice < ' _ > ] , offset : u64 ) -> io:: Result < usize > {
330
341
let ret = cvt ( unsafe {
@@ -339,7 +350,9 @@ impl FileDesc {
339
350
}
340
351
341
352
#[ cfg( not( any(
353
+ target_os = "aix" ,
342
354
target_os = "android" ,
355
+ target_os = "dragonfly" ,
343
356
target_os = "emscripten" ,
344
357
target_os = "freebsd" ,
345
358
target_os = "fuchsia" ,
@@ -350,6 +363,8 @@ impl FileDesc {
350
363
target_os = "linux" ,
351
364
target_os = "macos" ,
352
365
target_os = "netbsd" ,
366
+ target_os = "openbsd" ,
367
+ target_os = "watchos" ,
353
368
) ) ) ]
354
369
pub fn write_vectored_at ( & self , bufs : & [ IoSlice < ' _ > ] , offset : u64 ) -> io:: Result < usize > {
355
370
io:: default_write_vectored ( |b| self . write_at ( b, offset) , bufs)
@@ -387,9 +402,10 @@ impl FileDesc {
387
402
// no `syscall` possible in these platform.
388
403
#[ cfg( any(
389
404
all( target_os = "android" , target_pointer_width = "32" ) ,
390
- target_os = "ios" ,
391
- target_os = "tvos" ,
392
- target_os = "macos" ,
405
+ target_os = "ios" , // ios 14.0
406
+ target_os = "tvos" , // tvos 14.0
407
+ target_os = "macos" , // macos 11.0
408
+ target_os = "watchos" , // watchos 7.0
393
409
) ) ]
394
410
pub fn write_vectored_at ( & self , bufs : & [ IoSlice < ' _ > ] , offset : u64 ) -> io:: Result < usize > {
395
411
super :: weak:: weak!( fn pwritev64( libc:: c_int, * const libc:: iovec, libc:: c_int, off64_t) -> isize ) ;
0 commit comments