File tree 1 file changed +11
-3
lines changed
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -449,18 +449,26 @@ fn readlink_maybe_at<P: ?Sized + NixPath>(
449
449
match dirfd {
450
450
#[ cfg( target_os = "redox" ) ]
451
451
Some ( _) => unreachable!( ) ,
452
- #[ cfg( not( target_os = "redox" ) ) ]
452
+ #[ cfg( not( any( target_os = "redox" , target_os = "nto" ) ) ) ]
453
+ Some ( dirfd) => libc:: readlinkat(
454
+ dirfd,
455
+ cstr. as_ptr( ) ,
456
+ v. as_mut_ptr( ) . cast( ) ,
457
+ v. capacity( ) as size_t,
458
+ ) ,
459
+ // On Neutrino QNX, libc::readlinkat returns an `int` instead of ssize_t
460
+ #[ cfg( target_os = "nto" ) ]
453
461
Some ( dirfd) => libc:: readlinkat(
454
462
dirfd,
455
463
cstr. as_ptr( ) ,
456
464
v. as_mut_ptr( ) . cast( ) ,
457
465
v. capacity( ) as size_t,
458
- ) as _ ,
466
+ ) as libc :: ssize_t ,
459
467
None => libc:: readlink(
460
468
cstr. as_ptr( ) ,
461
469
v. as_mut_ptr( ) . cast( ) ,
462
470
v. capacity( ) as size_t,
463
- ) as _ ,
471
+ ) ,
464
472
}
465
473
} )
466
474
}
You can’t perform that action at this time.
0 commit comments