@@ -92,12 +92,12 @@ new_flag!(
9292 /// User Datagram Protocol.
9393 UDP = libc:: IPPROTO_UDP ,
9494 /// Datagram Congestion Control Protocol.
95- #[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
95+ #[ cfg( any( target_os = "android" , target_os = "freebsd" , target_os = " linux") ) ]
9696 DCCP = libc:: IPPROTO_DCCP ,
9797 /// Stream Control Transport Protocol.
9898 SCTP = libc:: IPPROTO_SCTP ,
9999 /// UDP-Lite.
100- #[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
100+ #[ cfg( any( target_os = "android" , target_os = "freebsd" , target_os = " linux") ) ]
101101 UDPLITE = libc:: IPPROTO_UDPLITE ,
102102 /// Raw IP packets.
103103 RAW = libc:: IPPROTO_RAW ,
@@ -411,7 +411,7 @@ new_flag!(
411411 pub struct RecvFlag ( u32 ) impl BitOr {
412412 /// Set the close-on-exec flag for the file descriptor received via a
413413 /// UNIX domain file descriptor using the `SCM_RIGHTS` operation.
414- #[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
414+ #[ cfg( any( target_os = "android" , target_os = "freebsd" , target_os = " linux") ) ]
415415 CMSG_CLOEXEC = libc:: MSG_CMSG_CLOEXEC ,
416416 /// This flag specifies that queued errors should be received from the
417417 /// socket error queue.
@@ -539,7 +539,7 @@ new_flag!(
539539 #[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
540540 DETACH_BPF = libc:: SO_DETACH_BPF ,
541541 /// Domain.
542- #[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
542+ #[ cfg( any( target_os = "android" , target_os = "freebsd" , target_os = " linux") ) ]
543543 DOMAIN = libc:: SO_DOMAIN ,
544544 /// Get and clear the pending socket error.
545545 ERROR = libc:: SO_ERROR ,
@@ -578,7 +578,7 @@ new_flag!(
578578 #[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
579579 PRIORITY = libc:: SO_PRIORITY ,
580580 /// Retrieves the socket protocol.
581- #[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
581+ #[ cfg( any( target_os = "android" , target_os = "freebsd" , target_os = " linux") ) ]
582582 PROTOCOL = libc:: SO_PROTOCOL ,
583583 /// Maximum receive buffer in bytes.
584584 RECV_BUF = libc:: SO_RCVBUF ,
@@ -689,7 +689,7 @@ new_flag!(
689689 #[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
690690 RECV_OPTS = libc:: IP_RECVOPTS ,
691691 /// Enables the `IP_ORIGDSTADDR` ancillary message in `recvmsg(2)`.
692- #[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
692+ #[ cfg( any( target_os = "android" , target_os = "freebsd" , target_os = " linux") ) ]
693693 RECV_ORIG_DST_ADDR = libc:: IP_RECVORIGDSTADDR ,
694694 /// Enable passing of `IP_TOS` in ancillary message with incoming
695695 /// packets.
@@ -785,7 +785,7 @@ new_flag!(
785785 #[ doc = man_link!( tcp( 7 ) ) ]
786786 pub struct TcpOpt ( u32 ) {
787787 /// Set the TCP congestion control algorithm to be used.
788- #[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
788+ #[ cfg( any( target_os = "android" , target_os = "freebsd" , target_os = " linux") ) ]
789789 CONGESTION = libc:: TCP_CONGESTION ,
790790 /// Don't send out partial frames.
791791 #[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
@@ -795,14 +795,14 @@ new_flag!(
795795 #[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
796796 DEFER_ACCEPT = libc:: TCP_DEFER_ACCEPT ,
797797 /// Collect information about this socket.
798- #[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
798+ #[ cfg( any( target_os = "android" , target_os = "freebsd" , target_os = " linux") ) ]
799799 INFO = libc:: TCP_INFO ,
800800 /// The maximum number of keepalive probes TCP should send before
801801 /// dropping the connection.
802802 KEEP_CNT = libc:: TCP_KEEPCNT ,
803803 /// The time (in seconds) the connection needs to remain idle before TCP
804804 /// starts sending keepalive probes.
805- #[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
805+ #[ cfg( any( target_os = "android" , target_os = "freebsd" , target_os = " linux") ) ]
806806 KEEP_IDLE = libc:: TCP_KEEPIDLE ,
807807 /// The time (in seconds) between individual keepalive probes.
808808 KEEP_INTVL = libc:: TCP_KEEPINTVL ,
@@ -1599,7 +1599,7 @@ impl private::SocketAddress for unix::net::SocketAddr {
15991599 fn into_storage ( self ) -> Self :: Storage {
16001600 let mut storage = libc:: sockaddr_un {
16011601 // A number of OS have `sin6_len`, but we don't use it.
1602- #[ cfg( not( any( target_os = "android" , target_os = "linux" ) ) ) ]
1602+ #[ cfg( not( any( target_os = "android" , target_os = "freebsd" , target_os = " linux") ) ) ]
16031603 sun_len : 0 ,
16041604 sun_family : libc:: AF_UNIX as libc:: sa_family_t ,
16051605 // SAFETY: all zero is valid for `sockaddr_un`.
0 commit comments