File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 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>(
449449 match dirfd {
450450 #[ cfg( target_os = "redox" ) ]
451451 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" ) ]
453461 Some ( dirfd) => libc:: readlinkat(
454462 dirfd,
455463 cstr. as_ptr( ) ,
456464 v. as_mut_ptr( ) . cast( ) ,
457465 v. capacity( ) as size_t,
458- ) as _ ,
466+ ) as libc :: ssize_t ,
459467 None => libc:: readlink(
460468 cstr. as_ptr( ) ,
461469 v. as_mut_ptr( ) . cast( ) ,
462470 v. capacity( ) as size_t,
463- ) as _ ,
471+ ) ,
464472 }
465473 } )
466474}
You can’t perform that action at this time.
0 commit comments