@@ -822,43 +822,41 @@ pub enum ControlMessageOwned {
822
822
TlsGetRecordType ( TlsGetRecordType ) ,
823
823
824
824
#[ cfg( any(
825
- target_os = "freebsd" ,
826
825
apple_targets,
826
+ linux_android
827
+ target_os = "freebsd" ,
827
828
target_os = "netbsd" ,
828
829
target_os = "openbsd" ,
829
- target_os = "android" ,
830
- target_os = "linux" ,
831
830
) ) ]
832
831
#[ cfg( feature = "net" ) ]
833
832
IpTos ( u8 ) ,
833
+
834
834
#[ cfg( any(
835
- target_os = "freebsd" ,
836
835
apple_targets,
836
+ linux_android
837
+ target_os = "freebsd" ,
837
838
target_os = "netbsd" ,
838
839
target_os = "openbsd" ,
839
- target_os = "android" ,
840
- target_os = "linux" ,
841
840
) ) ]
842
841
#[ cfg( feature = "net" ) ]
843
842
Ipv6TClass ( u8 ) ,
844
843
845
844
#[ cfg( any(
846
- target_os = "freebsd" ,
847
845
apple_targets,
846
+ linux_android
847
+ target_os = "freebsd" ,
848
848
target_os = "netbsd" ,
849
849
target_os = "openbsd" ,
850
- target_os = "android" ,
851
- target_os = "linux" ,
852
850
) ) ]
853
851
#[ cfg( feature = "net" ) ]
854
852
IpTtl ( u8 ) ,
853
+
855
854
#[ cfg( any(
856
- target_os = "freebsd" ,
857
855
apple_targets,
856
+ linux_android
857
+ target_os = "freebsd" ,
858
858
target_os = "netbsd" ,
859
859
target_os = "openbsd" ,
860
- target_os = "android" ,
861
- target_os = "linux" ,
862
860
) ) ]
863
861
#[ cfg( feature = "net" ) ]
864
862
Ipv6HopLimit ( u8 ) ,
@@ -1063,22 +1061,18 @@ impl ControlMessageOwned {
1063
1061
let tos = unsafe { ptr:: read_unaligned( p as * const u8 ) } ;
1064
1062
ControlMessageOwned :: IpTos ( tos. into( ) )
1065
1063
} ,
1066
- #[ cfg( any(
1067
- target_os = "android" ,
1068
- target_os = "linux" ,
1069
- ) ) ]
1064
+ #[ cfg( linux_android) ]
1070
1065
#[ cfg( feature = "net" ) ]
1071
1066
( libc:: IPPROTO_IP , libc:: IP_TOS ) => {
1072
1067
let tos = unsafe { ptr:: read_unaligned( p as * const u8 ) } ;
1073
1068
ControlMessageOwned :: IpTos ( tos. into( ) )
1074
1069
} ,
1075
1070
#[ cfg( any(
1076
- target_os = "freebsd" ,
1077
1071
apple_targets,
1072
+ linux_android
1073
+ target_os = "freebsd" ,
1078
1074
target_os = "netbsd" ,
1079
1075
target_os = "openbsd" ,
1080
- target_os = "android" ,
1081
- target_os = "linux" ,
1082
1076
) ) ]
1083
1077
#[ cfg( feature = "net" ) ]
1084
1078
( libc:: IPPROTO_IPV6 , libc:: IPV6_TCLASS ) => {
@@ -1096,22 +1090,18 @@ impl ControlMessageOwned {
1096
1090
let ttl = unsafe { ptr:: read_unaligned( p as * const u8 ) } ;
1097
1091
ControlMessageOwned :: IpTtl ( ttl. into( ) )
1098
1092
} ,
1099
- #[ cfg( any(
1100
- target_os = "android" ,
1101
- target_os = "linux" ,
1102
- ) ) ]
1093
+ #[ cfg( linux_android) ]
1103
1094
#[ cfg( feature = "net" ) ]
1104
1095
( libc:: IPPROTO_IP , libc:: IP_TTL ) => {
1105
1096
let ttl = unsafe { ptr:: read_unaligned( p as * const u8 ) } ;
1106
1097
ControlMessageOwned :: IpTtl ( ttl. into( ) )
1107
1098
} ,
1108
1099
#[ cfg( any(
1109
- target_os = "freebsd" ,
1110
1100
apple_targets,
1101
+ linux_android
1102
+ target_os = "freebsd" ,
1111
1103
target_os = "netbsd" ,
1112
1104
target_os = "openbsd" ,
1113
- target_os = "android" ,
1114
- target_os = "linux" ,
1115
1105
) ) ]
1116
1106
#[ cfg( feature = "net" ) ]
1117
1107
( libc:: IPPROTO_IPV6 , libc:: IPV6_HOPLIMIT ) => {
@@ -1288,33 +1278,31 @@ pub enum ControlMessage<'a> {
1288
1278
TxTime ( & ' a u64 ) ,
1289
1279
1290
1280
#[ cfg( any(
1291
- target_os = "freebsd" ,
1292
1281
apple_targets,
1282
+ linux_android,
1283
+ target_os = "freebsd" ,
1293
1284
target_os = "netbsd" ,
1294
1285
target_os = "openbsd" ,
1295
- target_os = "android" ,
1296
- target_os = "linux" ,
1297
1286
) ) ]
1298
1287
#[ cfg( feature = "net" ) ]
1299
1288
IpTos ( & ' a libc:: c_int) ,
1289
+
1300
1290
#[ cfg( any(
1301
- target_os = "freebsd" ,
1302
1291
apple_targets,
1292
+ linux_android,
1293
+ target_os = "freebsd" ,
1303
1294
target_os = "netbsd" ,
1304
1295
target_os = "openbsd" ,
1305
- target_os = "android" ,
1306
- target_os = "linux" ,
1307
1296
) ) ]
1308
1297
#[ cfg( feature = "net" ) ]
1309
1298
Ipv6TClass ( & ' a libc:: c_int) ,
1310
1299
1311
1300
#[ cfg( any(
1312
- target_os = "freebsd" ,
1313
1301
apple_targets,
1302
+ linux_android,
1303
+ target_os = "freebsd" ,
1314
1304
target_os = "netbsd" ,
1315
1305
target_os = "openbsd" ,
1316
- target_os = "android" ,
1317
- target_os = "linux" ,
1318
1306
) ) ]
1319
1307
#[ cfg( feature = "net" ) ]
1320
1308
IpTtl ( & ' a libc:: c_int) ,
@@ -1423,36 +1411,33 @@ impl<'a> ControlMessage<'a> {
1423
1411
tx_time as * const _ as * const u8
1424
1412
} ,
1425
1413
#[ cfg( any(
1426
- target_os = "freebsd" ,
1427
1414
apple_targets,
1415
+ linux_android,
1416
+ target_os = "freebsd" ,
1428
1417
target_os = "netbsd" ,
1429
1418
target_os = "openbsd" ,
1430
- target_os = "android" ,
1431
- target_os = "linux" ,
1432
1419
) ) ]
1433
1420
#[ cfg( feature = "net" ) ]
1434
1421
ControlMessage :: IpTos ( tos) => {
1435
1422
tos as * const _ as * const u8
1436
1423
} ,
1437
1424
#[ cfg( any(
1438
- target_os = "freebsd" ,
1439
1425
apple_targets,
1426
+ linux_android,
1427
+ target_os = "freebsd" ,
1440
1428
target_os = "netbsd" ,
1441
1429
target_os = "openbsd" ,
1442
- target_os = "android" ,
1443
- target_os = "linux" ,
1444
1430
) ) ]
1445
1431
#[ cfg( feature = "net" ) ]
1446
1432
ControlMessage :: Ipv6TClass ( tclass) => {
1447
1433
tclass as * const _ as * const u8
1448
1434
} ,
1449
1435
#[ cfg( any(
1450
- target_os = "freebsd" ,
1451
1436
apple_targets,
1437
+ linux_android,
1438
+ target_os = "freebsd" ,
1452
1439
target_os = "netbsd" ,
1453
1440
target_os = "openbsd" ,
1454
- target_os = "android" ,
1455
- target_os = "linux" ,
1456
1441
) ) ]
1457
1442
#[ cfg( feature = "net" ) ]
1458
1443
ControlMessage :: IpTtl ( ttl) => {
@@ -1523,36 +1508,33 @@ impl<'a> ControlMessage<'a> {
1523
1508
mem:: size_of_val( tx_time)
1524
1509
} ,
1525
1510
#[ cfg( any(
1526
- target_os = "freebsd" ,
1527
1511
apple_targets,
1512
+ linux_android,
1513
+ target_os = "freebsd" ,
1528
1514
target_os = "netbsd" ,
1529
1515
target_os = "openbsd" ,
1530
- target_os = "android" ,
1531
- target_os = "linux" ,
1532
1516
) ) ]
1533
1517
#[ cfg( feature = "net" ) ]
1534
1518
ControlMessage :: IpTos ( tos) => {
1535
1519
mem:: size_of_val( tos)
1536
1520
} ,
1537
1521
#[ cfg( any(
1538
- target_os = "freebsd" ,
1539
1522
apple_targets,
1523
+ linux_android,
1524
+ target_os = "freebsd" ,
1540
1525
target_os = "netbsd" ,
1541
1526
target_os = "openbsd" ,
1542
- target_os = "android" ,
1543
- target_os = "linux" ,
1544
1527
) ) ]
1545
1528
#[ cfg( feature = "net" ) ]
1546
1529
ControlMessage :: Ipv6TClass ( tclass) => {
1547
1530
mem:: size_of_val( tclass)
1548
1531
} ,
1549
1532
#[ cfg( any(
1550
- target_os = "freebsd" ,
1551
1533
apple_targets,
1534
+ linux_android,
1535
+ target_os = "freebsd" ,
1552
1536
target_os = "netbsd" ,
1553
1537
target_os = "openbsd" ,
1554
- target_os = "android" ,
1555
- target_os = "linux" ,
1556
1538
) ) ]
1557
1539
#[ cfg( feature = "net" ) ]
1558
1540
ControlMessage :: IpTtl ( ttl) => {
@@ -1593,32 +1575,29 @@ impl<'a> ControlMessage<'a> {
1593
1575
#[ cfg( target_os = "linux" ) ]
1594
1576
ControlMessage :: TxTime ( _) => libc:: SOL_SOCKET ,
1595
1577
#[ cfg( any(
1596
- target_os = "freebsd" ,
1597
1578
apple_targets,
1579
+ linux_android,
1580
+ target_os = "freebsd" ,
1598
1581
target_os = "netbsd" ,
1599
1582
target_os = "openbsd" ,
1600
- target_os = "android" ,
1601
- target_os = "linux" ,
1602
1583
) ) ]
1603
1584
#[ cfg( feature = "net" ) ]
1604
1585
ControlMessage :: IpTos ( _) => libc:: IPPROTO_IP ,
1605
1586
#[ cfg( any(
1606
- target_os = "freebsd" ,
1607
1587
apple_targets,
1588
+ linux_android,
1589
+ target_os = "freebsd" ,
1608
1590
target_os = "netbsd" ,
1609
1591
target_os = "openbsd" ,
1610
- target_os = "android" ,
1611
- target_os = "linux" ,
1612
1592
) ) ]
1613
1593
#[ cfg( feature = "net" ) ]
1614
1594
ControlMessage :: Ipv6TClass ( _) => libc:: IPPROTO_IPV6 ,
1615
1595
#[ cfg( any(
1616
- target_os = "freebsd" ,
1617
1596
apple_targets,
1597
+ linux_android,
1598
+ target_os = "freebsd" ,
1618
1599
target_os = "netbsd" ,
1619
1600
target_os = "openbsd" ,
1620
- target_os = "android" ,
1621
- target_os = "linux" ,
1622
1601
) ) ]
1623
1602
#[ cfg( feature = "net" ) ]
1624
1603
ControlMessage :: IpTtl ( _) => libc:: IPPROTO_IP ,
@@ -1672,32 +1651,29 @@ impl<'a> ControlMessage<'a> {
1672
1651
libc:: SCM_TXTIME
1673
1652
} ,
1674
1653
#[ cfg( any(
1675
- target_os = "freebsd" ,
1676
1654
apple_targets,
1655
+ linux_android,
1656
+ target_os = "freebsd" ,
1677
1657
target_os = "netbsd" ,
1678
1658
target_os = "openbsd" ,
1679
- target_os = "android" ,
1680
- target_os = "linux" ,
1681
1659
) ) ]
1682
1660
#[ cfg( feature = "net" ) ]
1683
1661
ControlMessage :: IpTos ( _) => libc:: IP_TOS ,
1684
1662
#[ cfg( any(
1685
- target_os = "freebsd" ,
1686
1663
apple_targets,
1664
+ linux_android,
1665
+ target_os = "freebsd" ,
1687
1666
target_os = "netbsd" ,
1688
1667
target_os = "openbsd" ,
1689
- target_os = "android" ,
1690
- target_os = "linux" ,
1691
1668
) ) ]
1692
1669
#[ cfg( feature = "net" ) ]
1693
1670
ControlMessage :: Ipv6TClass ( _) => libc:: IPV6_TCLASS ,
1694
1671
#[ cfg( any(
1695
- target_os = "freebsd" ,
1696
1672
apple_targets,
1673
+ linux_android,
1674
+ target_os = "freebsd" ,
1697
1675
target_os = "netbsd" ,
1698
1676
target_os = "openbsd" ,
1699
- target_os = "android" ,
1700
- target_os = "linux" ,
1701
1677
) ) ]
1702
1678
#[ cfg( feature = "net" ) ]
1703
1679
ControlMessage :: IpTtl ( _) => libc:: IP_TTL ,
0 commit comments