File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ pub(crate) struct ListenOp;
8080impl FdOp for ListenOp {
8181 type Output = ( ) ;
8282 type Resources = ( ) ;
83- type Args = libc :: c_int ; // backlog.
83+ type Args = u32 ; // backlog.
8484
8585 #[ allow( clippy:: cast_sign_loss) ]
8686 fn fill_submission (
@@ -91,7 +91,7 @@ impl FdOp for ListenOp {
9191 ) {
9292 submission. 0 . opcode = libc:: IORING_OP_LISTEN as u8 ;
9393 submission. 0 . fd = fd. fd ( ) ;
94- submission. 0 . len = * backlog as u32 ;
94+ submission. 0 . len = * backlog;
9595 }
9696
9797 fn map_ok ( _: & AsyncFd , ( ) : Self :: Resources , ( _, n) : OpReturn ) -> Self :: Output {
Original file line number Diff line number Diff line change @@ -95,10 +95,10 @@ pub(crate) struct ListenOp;
9595impl DirectFdOp for ListenOp {
9696 type Output = ( ) ;
9797 type Resources = ( ) ;
98- type Args = libc :: c_int ; // backlog.
98+ type Args = u32 ; // backlog.
9999
100100 fn run ( fd : & AsyncFd , ( ) : Self :: Resources , backlog : Self :: Args ) -> io:: Result < Self :: Output > {
101- syscall ! ( listen( fd. fd( ) , backlog) ) ?;
101+ syscall ! ( listen( fd. fd( ) , backlog. cast_signed ( ) ) ) ?;
102102 Ok ( ( ) )
103103 }
104104}
Original file line number Diff line number Diff line change @@ -474,7 +474,7 @@ pub(crate) async fn bind_and_listen_ipv4(socket: &AsyncFd) -> SocketAddr {
474474 Err ( ref err) if is_unsupported ( err) => {
475475 // IORING_OP_LISTEN is only available since 6.11, fall back to a
476476 // blocking system call.
477- syscall ! ( listen( fd, backlog) ) . map ( |_| ( ) )
477+ syscall ! ( listen( fd, backlog. cast_signed ( ) ) ) . map ( |_| ( ) )
478478 }
479479 Err ( err) => Err ( err) ,
480480 }
You can’t perform that action at this time.
0 commit comments