@@ -232,14 +232,14 @@ impl FileDesc {
232
232
// implementation if `preadv` is not available.
233
233
#[ cfg( all( target_os = "android" , target_pointer_width = "64" ) ) ]
234
234
pub fn read_vectored_at ( & self , bufs : & mut [ IoSliceMut < ' _ > ] , offset : u64 ) -> io:: Result < usize > {
235
- super :: weak:: syscall! {
235
+ super :: weak:: syscall!(
236
236
fn preadv(
237
237
fd: libc:: c_int,
238
238
iovec: * const libc:: iovec,
239
239
n_iovec: libc:: c_int,
240
- offset: off64_t
241
- ) -> isize
242
- }
240
+ offset: off64_t,
241
+ ) -> isize ;
242
+ ) ;
243
243
244
244
let ret = cvt ( unsafe {
245
245
preadv (
@@ -257,7 +257,14 @@ impl FileDesc {
257
257
// and its metadata from LLVM IR.
258
258
#[ no_sanitize( cfi) ]
259
259
pub fn read_vectored_at ( & self , bufs : & mut [ IoSliceMut < ' _ > ] , offset : u64 ) -> io:: Result < usize > {
260
- super :: weak:: weak!( fn preadv64( libc:: c_int, * const libc:: iovec, libc:: c_int, off64_t) -> isize ) ;
260
+ super :: weak:: weak!(
261
+ fn preadv64(
262
+ fd: libc:: c_int,
263
+ iovec: * const libc:: iovec,
264
+ n_iovec: libc:: c_int,
265
+ offset: off64_t,
266
+ ) -> isize ;
267
+ ) ;
261
268
262
269
match preadv64. get ( ) {
263
270
Some ( preadv) => {
@@ -286,7 +293,14 @@ impl FileDesc {
286
293
// use "weak" linking.
287
294
#[ cfg( target_vendor = "apple" ) ]
288
295
pub fn read_vectored_at ( & self , bufs : & mut [ IoSliceMut < ' _ > ] , offset : u64 ) -> io:: Result < usize > {
289
- super :: weak:: weak!( fn preadv( libc:: c_int, * const libc:: iovec, libc:: c_int, off64_t) -> isize ) ;
296
+ super :: weak:: weak!(
297
+ fn preadv(
298
+ fd: libc:: c_int,
299
+ iovec: * const libc:: iovec,
300
+ n_iovec: libc:: c_int,
301
+ offset: off64_t,
302
+ ) -> isize ;
303
+ ) ;
290
304
291
305
match preadv. get ( ) {
292
306
Some ( preadv) => {
@@ -428,14 +442,14 @@ impl FileDesc {
428
442
// implementation if `pwritev` is not available.
429
443
#[ cfg( all( target_os = "android" , target_pointer_width = "64" ) ) ]
430
444
pub fn write_vectored_at ( & self , bufs : & [ IoSlice < ' _ > ] , offset : u64 ) -> io:: Result < usize > {
431
- super :: weak:: syscall! {
445
+ super :: weak:: syscall!(
432
446
fn pwritev(
433
447
fd: libc:: c_int,
434
448
iovec: * const libc:: iovec,
435
449
n_iovec: libc:: c_int,
436
- offset: off64_t
437
- ) -> isize
438
- }
450
+ offset: off64_t,
451
+ ) -> isize ;
452
+ ) ;
439
453
440
454
let ret = cvt ( unsafe {
441
455
pwritev (
@@ -450,7 +464,14 @@ impl FileDesc {
450
464
451
465
#[ cfg( all( target_os = "android" , target_pointer_width = "32" ) ) ]
452
466
pub fn write_vectored_at ( & self , bufs : & [ IoSlice < ' _ > ] , offset : u64 ) -> io:: Result < usize > {
453
- super :: weak:: weak!( fn pwritev64( libc:: c_int, * const libc:: iovec, libc:: c_int, off64_t) -> isize ) ;
467
+ super :: weak:: weak!(
468
+ fn pwritev64(
469
+ fd: libc:: c_int,
470
+ iovec: * const libc:: iovec,
471
+ n_iovec: libc:: c_int,
472
+ offset: off64_t,
473
+ ) -> isize ;
474
+ ) ;
454
475
455
476
match pwritev64. get ( ) {
456
477
Some ( pwritev) => {
@@ -479,7 +500,14 @@ impl FileDesc {
479
500
// use "weak" linking.
480
501
#[ cfg( target_vendor = "apple" ) ]
481
502
pub fn write_vectored_at ( & self , bufs : & [ IoSlice < ' _ > ] , offset : u64 ) -> io:: Result < usize > {
482
- super :: weak:: weak!( fn pwritev( libc:: c_int, * const libc:: iovec, libc:: c_int, off64_t) -> isize ) ;
503
+ super :: weak:: weak!(
504
+ fn pwritev(
505
+ fd: libc:: c_int,
506
+ iovec: * const libc:: iovec,
507
+ n_iovec: libc:: c_int,
508
+ offset: off64_t,
509
+ ) -> isize ;
510
+ ) ;
483
511
484
512
match pwritev. get ( ) {
485
513
Some ( pwritev) => {
0 commit comments