@@ -11,10 +11,14 @@ use sys::time::TimeVal;
11
11
use sys:: uio:: IoVec ;
12
12
#[ cfg( any(
13
13
target_os = "linux" ,
14
+ target_os = "freebsd" ,
15
+ target_os = "netbsd" ,
14
16
) ) ]
15
17
use sys:: time:: TimeSpec ;
16
18
#[ cfg( any(
17
19
target_os = "linux" ,
20
+ target_os = "freebsd" ,
21
+ target_os = "netbsd" ,
18
22
) ) ]
19
23
use std:: marker:: PhantomData ;
20
24
@@ -1345,13 +1349,17 @@ pub fn shutdown(df: RawFd, how: Shutdown) -> Result<()> {
1345
1349
1346
1350
#[ cfg( any(
1347
1351
target_os = "linux" ,
1352
+ target_os = "freebsd" ,
1353
+ target_os = "netbsd" ,
1348
1354
) ) ]
1349
1355
#[ repr( C ) ]
1350
1356
#[ allow( missing_debug_implementations) ]
1351
1357
pub struct SendMMsgHdr < ' a > ( libc:: mmsghdr , PhantomData < & ' a ( ) > ) ;
1352
1358
1353
1359
#[ cfg( any(
1354
1360
target_os = "linux" ,
1361
+ target_os = "freebsd" ,
1362
+ target_os = "netbsd" ,
1355
1363
) ) ]
1356
1364
impl < ' a > SendMMsgHdr < ' a > {
1357
1365
pub fn new ( iov : & mut [ IoVec < & ' a mut [ u8 ] > ] ,
@@ -1436,13 +1444,17 @@ impl<'a> SendMMsgHdr<'a> {
1436
1444
1437
1445
#[ cfg( any(
1438
1446
target_os = "linux" ,
1447
+ target_os = "freebsd" ,
1448
+ target_os = "netbsd" ,
1439
1449
) ) ]
1440
1450
#[ repr( C ) ]
1441
1451
#[ allow( missing_debug_implementations) ]
1442
1452
pub struct RecvMMsgHdr < ' a > ( libc:: mmsghdr , PhantomData < & ' a ( ) > ) ;
1443
1453
1444
1454
#[ cfg( any(
1445
1455
target_os = "linux" ,
1456
+ target_os = "freebsd" ,
1457
+ target_os = "netbsd" ,
1446
1458
) ) ]
1447
1459
impl < ' a > RecvMMsgHdr < ' a > {
1448
1460
pub fn new < T > ( iov : & mut [ IoVec < & ' a mut [ u8 ] > ] ,
@@ -1505,6 +1517,8 @@ impl<'a> RecvMMsgHdr<'a> {
1505
1517
/// Receive multiple messages from a socket using a single system call.
1506
1518
#[ cfg( any(
1507
1519
target_os = "linux" ,
1520
+ target_os = "freebsd" ,
1521
+ target_os = "netbsd" ,
1508
1522
) ) ]
1509
1523
pub fn recvmmsg ( fd : RawFd , msgvec : & mut [ RecvMMsgHdr ] ,
1510
1524
flags : MsgFlags ,
@@ -1528,6 +1542,8 @@ pub fn recvmmsg(fd: RawFd, msgvec: &mut[RecvMMsgHdr],
1528
1542
/// Transmit multiple messages on a socket using a single system call.
1529
1543
#[ cfg( any(
1530
1544
target_os = "linux" ,
1545
+ target_os = "freebsd" ,
1546
+ target_os = "netbsd" ,
1531
1547
) ) ]
1532
1548
pub fn sendmmsg ( fd : RawFd , msgvec : & mut [ SendMMsgHdr ] ) -> Result < usize > {
1533
1549
let ret = unsafe {
0 commit comments