File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -237,6 +237,15 @@ impl Socket {
237
237
self . recv_from_with_flags ( buf, 0 )
238
238
}
239
239
240
+ #[ cfg( any(
241
+ target_os = "android" ,
242
+ target_os = "dragonfly" ,
243
+ target_os = "emscripten" ,
244
+ target_os = "freebsd" ,
245
+ target_os = "linux" ,
246
+ target_os = "netbsd" ,
247
+ target_os = "openbsd" ,
248
+ ) ) ]
240
249
pub fn recv_msg ( & self , msg : & mut libc:: msghdr ) -> io:: Result < usize > {
241
250
let n = cvt ( unsafe { libc:: recvmsg ( self . 0 . raw ( ) , msg, libc:: MSG_CMSG_CLOEXEC ) } ) ?;
242
251
Ok ( n as usize )
@@ -259,6 +268,15 @@ impl Socket {
259
268
self . 0 . is_write_vectored ( )
260
269
}
261
270
271
+ #[ cfg( any(
272
+ target_os = "android" ,
273
+ target_os = "dragonfly" ,
274
+ target_os = "emscripten" ,
275
+ target_os = "freebsd" ,
276
+ target_os = "linux" ,
277
+ target_os = "netbsd" ,
278
+ target_os = "openbsd" ,
279
+ ) ) ]
262
280
pub fn send_msg ( & self , msg : & mut libc:: msghdr ) -> io:: Result < usize > {
263
281
let n = cvt ( unsafe { libc:: sendmsg ( self . 0 . raw ( ) , msg, 0 ) } ) ?;
264
282
Ok ( n as usize )
You can’t perform that action at this time.
0 commit comments