File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ fn main() {
15
15
watchos: { target_os = "watchos" } ,
16
16
tvos: { target_os = "tvos" } ,
17
17
visionos: { target_os = "visionos" } ,
18
+ nto_qnx: { target_os = "nto" } ,
18
19
19
20
20
21
// cfg aliases we would like to use
Original file line number Diff line number Diff line change @@ -459,18 +459,26 @@ fn readlink_maybe_at<P: ?Sized + NixPath>(
459
459
match dirfd {
460
460
#[ cfg( target_os = "redox" ) ]
461
461
Some ( _) => unreachable!( ) ,
462
- #[ cfg( not( target_os = "redox" ) ) ]
462
+ #[ cfg( not( any( target_os = "redox" , target_os = "nto" ) ) ) ]
463
+ Some ( dirfd) => libc:: readlinkat(
464
+ dirfd,
465
+ cstr. as_ptr( ) ,
466
+ v. as_mut_ptr( ) . cast( ) ,
467
+ v. capacity( ) as size_t,
468
+ ) ,
469
+ // On Neutrino QNX, libc::readlinkat returns an `int` instead of ssize_t
470
+ #[ cfg( target_os = "nto" ) ]
463
471
Some ( dirfd) => libc:: readlinkat(
464
472
dirfd,
465
473
cstr. as_ptr( ) ,
466
474
v. as_mut_ptr( ) . cast( ) ,
467
475
v. capacity( ) as size_t,
468
- ) as _ ,
476
+ ) as libc :: ssize_t ,
469
477
None => libc:: readlink(
470
478
cstr. as_ptr( ) ,
471
479
v. as_mut_ptr( ) . cast( ) ,
472
480
v. capacity( ) as size_t,
473
- ) as _ ,
481
+ ) ,
474
482
}
475
483
} )
476
484
}
You can’t perform that action at this time.
0 commit comments