Skip to content

Commit 68de29b

Browse files
authored
Remove Socket::(set_)header_included_v6 on unsupported OS
1 parent 3a93893 commit 68de29b

File tree

2 files changed

+33
-3
lines changed

2 files changed

+33
-3
lines changed

src/socket.rs

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1682,7 +1682,17 @@ impl Socket {
16821682
/// For more information about this option, see [`set_header_included`].
16831683
///
16841684
/// [`set_header_included`]: Socket::set_header_included
1685-
#[cfg(all(feature = "all", not(any(target_os = "redox", target_os = "espidf"))))]
1685+
#[cfg(all(
1686+
feature = "all",
1687+
not(any(
1688+
target_os = "redox",
1689+
target_os = "espidf",
1690+
target_os = "openbsd",
1691+
target_os = "freebsd",
1692+
target_os = "dragonfly",
1693+
target_os = "netbsd"
1694+
))
1695+
))]
16861696
#[cfg_attr(
16871697
docsrs,
16881698
doc(cfg(all(feature = "all", not(any(target_os = "redox", target_os = "espidf")))))
@@ -1706,7 +1716,17 @@ impl Socket {
17061716
any(target_os = "fuchsia", target_os = "illumos", target_os = "solaris"),
17071717
allow(rustdoc::broken_intra_doc_links)
17081718
)]
1709-
#[cfg(all(feature = "all", not(any(target_os = "redox", target_os = "espidf"))))]
1719+
#[cfg(all(
1720+
feature = "all",
1721+
not(any(
1722+
target_os = "redox",
1723+
target_os = "espidf",
1724+
target_os = "openbsd",
1725+
target_os = "freebsd",
1726+
target_os = "dragonfly",
1727+
target_os = "netbsd"
1728+
))
1729+
))]
17101730
#[cfg_attr(
17111731
docsrs,
17121732
doc(cfg(all(feature = "all", not(any(target_os = "redox", target_os = "espidf")))))

tests/socket.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1564,7 +1564,17 @@ fn header_included() {
15641564
}
15651565

15661566
#[test]
1567-
#[cfg(all(feature = "all", not(target_os = "redox")))]
1567+
#[cfg(all(
1568+
feature = "all",
1569+
not(any(
1570+
target_os = "redox",
1571+
target_os = "espidf",
1572+
target_os = "openbsd",
1573+
target_os = "freebsd",
1574+
target_os = "dragonfly",
1575+
target_os = "netbsd"
1576+
))
1577+
))]
15681578
fn header_included_ipv6() {
15691579
let socket = match Socket::new(Domain::IPV6, Type::RAW, None) {
15701580
Ok(socket) => socket,

0 commit comments

Comments
 (0)