@@ -2441,53 +2441,70 @@ pub(crate) fn fsetxattr(
24412441}
24422442
24432443#[ cfg( any( apple, linux_kernel, target_os = "hurd" ) ) ]
2444- pub ( crate ) fn listxattr ( path : & CStr , list : & mut [ ffi :: c_char ] ) -> io:: Result < usize > {
2444+ pub ( crate ) fn listxattr ( path : & CStr , list : & mut [ u8 ] ) -> io:: Result < usize > {
24452445 #[ cfg( not( apple) ) ]
24462446 unsafe {
2447- ret_usize ( c:: listxattr ( path. as_ptr ( ) , list. as_mut_ptr ( ) , list. len ( ) ) )
2447+ ret_usize ( c:: listxattr (
2448+ path. as_ptr ( ) ,
2449+ list. as_mut_ptr ( ) . cast :: < ffi:: c_char > ( ) ,
2450+ list. len ( ) ,
2451+ ) )
24482452 }
24492453
24502454 #[ cfg( apple) ]
24512455 unsafe {
24522456 ret_usize ( c:: listxattr (
24532457 path. as_ptr ( ) ,
2454- list. as_mut_ptr ( ) ,
2458+ list. as_mut_ptr ( ) . cast :: < ffi :: c_char > ( ) ,
24552459 list. len ( ) ,
24562460 0 ,
24572461 ) )
24582462 }
24592463}
24602464
24612465#[ cfg( any( apple, linux_kernel, target_os = "hurd" ) ) ]
2462- pub ( crate ) fn llistxattr ( path : & CStr , list : & mut [ ffi :: c_char ] ) -> io:: Result < usize > {
2466+ pub ( crate ) fn llistxattr ( path : & CStr , list : & mut [ u8 ] ) -> io:: Result < usize > {
24632467 #[ cfg( not( apple) ) ]
24642468 unsafe {
2465- ret_usize ( c:: llistxattr ( path. as_ptr ( ) , list. as_mut_ptr ( ) , list. len ( ) ) )
2469+ ret_usize ( c:: llistxattr (
2470+ path. as_ptr ( ) ,
2471+ list. as_mut_ptr ( ) . cast :: < ffi:: c_char > ( ) ,
2472+ list. len ( ) ,
2473+ ) )
24662474 }
24672475
24682476 #[ cfg( apple) ]
24692477 unsafe {
24702478 ret_usize ( c:: listxattr (
24712479 path. as_ptr ( ) ,
2472- list. as_mut_ptr ( ) ,
2480+ list. as_mut_ptr ( ) . cast :: < ffi :: c_char > ( ) ,
24732481 list. len ( ) ,
24742482 c:: XATTR_NOFOLLOW ,
24752483 ) )
24762484 }
24772485}
24782486
24792487#[ cfg( any( apple, linux_kernel, target_os = "hurd" ) ) ]
2480- pub ( crate ) fn flistxattr ( fd : BorrowedFd < ' _ > , list : & mut [ ffi :: c_char ] ) -> io:: Result < usize > {
2488+ pub ( crate ) fn flistxattr ( fd : BorrowedFd < ' _ > , list : & mut [ u8 ] ) -> io:: Result < usize > {
24812489 let fd = borrowed_fd ( fd) ;
24822490
24832491 #[ cfg( not( apple) ) ]
24842492 unsafe {
2485- ret_usize ( c:: flistxattr ( fd, list. as_mut_ptr ( ) , list. len ( ) ) )
2493+ ret_usize ( c:: flistxattr (
2494+ fd,
2495+ list. as_mut_ptr ( ) . cast :: < ffi:: c_char > ( ) ,
2496+ list. len ( ) ,
2497+ ) )
24862498 }
24872499
24882500 #[ cfg( apple) ]
24892501 unsafe {
2490- ret_usize ( c:: flistxattr ( fd, list. as_mut_ptr ( ) , list. len ( ) , 0 ) )
2502+ ret_usize ( c:: flistxattr (
2503+ fd,
2504+ list. as_mut_ptr ( ) . cast :: < ffi:: c_char > ( ) ,
2505+ list. len ( ) ,
2506+ 0 ,
2507+ ) )
24912508 }
24922509}
24932510
0 commit comments