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