1
+ #[ cfg( all( unix, any( feature = "legacy" , feature = "poll-io" ) ) ) ]
2
+ use std:: os:: unix:: prelude:: AsRawFd ;
1
3
use std:: { io, net:: SocketAddr } ;
2
4
3
5
#[ cfg( all( target_os = "linux" , feature = "iouring" ) ) ]
4
6
use io_uring:: { opcode, types} ;
5
7
use socket2:: SockAddr ;
6
8
#[ cfg( all( windows, any( feature = "legacy" , feature = "poll-io" ) ) ) ]
7
9
use {
8
- crate :: syscall,
9
10
std:: os:: windows:: io:: AsRawSocket ,
10
11
windows_sys:: Win32 :: Networking :: WinSock :: { send, WSASendMsg , SOCKET_ERROR } ,
11
12
} ;
12
- #[ cfg( all( unix, any( feature = "legacy" , feature = "poll-io" ) ) ) ]
13
- use { crate :: syscall_u32, std:: os:: unix:: prelude:: AsRawFd } ;
14
13
15
14
use super :: { super :: shared_fd:: SharedFd , Op , OpAble } ;
16
15
#[ cfg( any( feature = "legacy" , feature = "poll-io" ) ) ]
@@ -104,7 +103,7 @@ impl<T: IoBuf> OpAble for Send<T> {
104
103
#[ cfg( not( target_os = "linux" ) ) ]
105
104
let flags = 0 ;
106
105
107
- syscall_u32 ! ( send@NON_FD (
106
+ crate :: syscall !( send@NON_FD (
108
107
fd,
109
108
self . buf. read_ptr( ) as _,
110
109
self . buf. bytes_init( ) ,
@@ -115,7 +114,7 @@ impl<T: IoBuf> OpAble for Send<T> {
115
114
#[ cfg( all( any( feature = "legacy" , feature = "poll-io" ) , windows) ) ]
116
115
fn legacy_call ( & mut self ) -> io:: Result < MaybeFd > {
117
116
let fd = self . fd . as_raw_socket ( ) ;
118
- syscall ! (
117
+ crate :: syscall!(
119
118
send@NON_FD ( fd as _, self . buf. read_ptr( ) , self . buf. bytes_init( ) as _, 0 ) ,
120
119
PartialOrd :: lt,
121
120
0
@@ -215,7 +214,7 @@ impl<T: IoBuf> OpAble for SendMsg<T> {
215
214
#[ cfg( not( target_os = "linux" ) ) ]
216
215
const FLAGS : libc:: c_int = 0 ;
217
216
let fd = self . fd . as_raw_fd ( ) ;
218
- syscall_u32 ! ( sendmsg@NON_FD ( fd, & * self . info. 2 , FLAGS ) )
217
+ crate :: syscall !( sendmsg@NON_FD ( fd, & * self . info. 2 , FLAGS ) )
219
218
}
220
219
221
220
#[ cfg( all( any( feature = "legacy" , feature = "poll-io" ) , windows) ) ]
@@ -319,6 +318,6 @@ impl<T: IoBuf> OpAble for SendMsgUnix<T> {
319
318
#[ cfg( not( target_os = "linux" ) ) ]
320
319
const FLAGS : libc:: c_int = 0 ;
321
320
let fd = self . fd . as_raw_fd ( ) ;
322
- syscall_u32 ! ( sendmsg@NON_FD ( fd, & mut self . info. 2 as * mut _, FLAGS ) )
321
+ crate :: syscall !( sendmsg@NON_FD ( fd, & mut self . info. 2 as * mut _, FLAGS ) )
323
322
}
324
323
}
0 commit comments