@@ -912,7 +912,7 @@ pub enum ControlMessageOwned {
912
912
///
913
913
/// `UdpGroSegment` socket option should be enabled on a socket
914
914
/// to allow receiving GRO packets.
915
- #[cfg(target_os = "linux" )]
915
+ #[cfg(linux_android )]
916
916
#[cfg(feature = "net")]
917
917
#[cfg_attr(docsrs, doc(cfg(feature = "net")))]
918
918
UdpGroSegments(i32),
@@ -1087,7 +1087,7 @@ impl ControlMessageOwned {
1087
1087
let dl = unsafe { ptr::read_unaligned(p as *const libc::sockaddr_in) };
1088
1088
ControlMessageOwned::Ipv4OrigDstAddr(dl)
1089
1089
},
1090
- #[cfg(target_os = "linux" )]
1090
+ #[cfg(linux_android )]
1091
1091
#[cfg(feature = "net")]
1092
1092
(libc::SOL_UDP, libc::UDP_GRO) => {
1093
1093
let gso_size: i32 = unsafe { ptr::read_unaligned(p as *const _) };
@@ -1265,7 +1265,7 @@ pub enum ControlMessage<'a> {
1265
1265
/// passed through this control message.
1266
1266
/// Send buffer should consist of multiple fixed-size wire payloads
1267
1267
/// following one by one, and the last, possibly smaller one.
1268
- #[cfg(target_os = "linux" )]
1268
+ #[cfg(linux_android )]
1269
1269
#[cfg(feature = "net")]
1270
1270
#[cfg_attr(docsrs, doc(cfg(feature = "net")))]
1271
1271
UdpGsoSegments(&'a u16),
@@ -1437,7 +1437,7 @@ impl ControlMessage<'_> {
1437
1437
ControlMessage::AlgSetAeadAssoclen(len) => {
1438
1438
len as *const _ as *const u8
1439
1439
},
1440
- #[cfg(target_os = "linux" )]
1440
+ #[cfg(linux_android )]
1441
1441
#[cfg(feature = "net")]
1442
1442
ControlMessage::UdpGsoSegments(gso_size) => {
1443
1443
gso_size as *const _ as *const u8
@@ -1515,7 +1515,7 @@ impl ControlMessage<'_> {
1515
1515
ControlMessage::AlgSetAeadAssoclen(len) => {
1516
1516
mem::size_of_val(len)
1517
1517
},
1518
- #[cfg(target_os = "linux" )]
1518
+ #[cfg(linux_android )]
1519
1519
#[cfg(feature = "net")]
1520
1520
ControlMessage::UdpGsoSegments(gso_size) => {
1521
1521
mem::size_of_val(gso_size)
@@ -1572,7 +1572,7 @@ impl ControlMessage<'_> {
1572
1572
#[cfg(linux_android)]
1573
1573
ControlMessage::AlgSetIv(_) | ControlMessage::AlgSetOp(_) |
1574
1574
ControlMessage::AlgSetAeadAssoclen(_) => libc::SOL_ALG,
1575
- #[cfg(target_os = "linux" )]
1575
+ #[cfg(linux_android )]
1576
1576
#[cfg(feature = "net")]
1577
1577
ControlMessage::UdpGsoSegments(_) => libc::SOL_UDP,
1578
1578
#[cfg(any(linux_android, target_os = "netbsd", apple_targets))]
@@ -1624,7 +1624,7 @@ impl ControlMessage<'_> {
1624
1624
ControlMessage::AlgSetAeadAssoclen(_) => {
1625
1625
libc::ALG_SET_AEAD_ASSOCLEN
1626
1626
},
1627
- #[cfg(target_os = "linux" )]
1627
+ #[cfg(linux_android )]
1628
1628
#[cfg(feature = "net")]
1629
1629
ControlMessage::UdpGsoSegments(_) => {
1630
1630
libc::UDP_SEGMENT
0 commit comments