summaryrefslogtreecommitdiffstats
path: root/vendor/socket2/src/socket.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:03 +0000
commit9918693037dce8aa4bb6f08741b6812923486c18 (patch)
tree21d2b40bec7e6a7ea664acee056eb3d08e15a1cf /vendor/socket2/src/socket.rs
parentReleasing progress-linux version 1.75.0+dfsg1-5~progress7.99u1. (diff)
downloadrustc-9918693037dce8aa4bb6f08741b6812923486c18.tar.xz
rustc-9918693037dce8aa4bb6f08741b6812923486c18.zip
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/socket2/src/socket.rs')
-rw-r--r--vendor/socket2/src/socket.rs42
1 files changed, 36 insertions, 6 deletions
diff --git a/vendor/socket2/src/socket.rs b/vendor/socket2/src/socket.rs
index 69d0478dd..90649d9d3 100644
--- a/vendor/socket2/src/socket.rs
+++ b/vendor/socket2/src/socket.rs
@@ -729,6 +729,8 @@ fn set_common_flags(socket: Socket) -> io::Result<Socket> {
target_os = "linux",
target_os = "netbsd",
target_os = "openbsd",
+ target_os = "espidf",
+ target_os = "vita",
))
))]
socket._set_cloexec(true)?;
@@ -1042,8 +1044,11 @@ impl Socket {
/// For more information about this option, see [`set_header_included`].
///
/// [`set_header_included`]: Socket::set_header_included
- #[cfg(all(feature = "all", not(target_os = "redox")))]
- #[cfg_attr(docsrs, doc(all(feature = "all", not(target_os = "redox"))))]
+ #[cfg(all(feature = "all", not(any(target_os = "redox", target_os = "espidf"))))]
+ #[cfg_attr(
+ docsrs,
+ doc(cfg(all(feature = "all", not(any(target_os = "redox", target_os = "espidf")))))
+ )]
pub fn header_included(&self) -> io::Result<bool> {
unsafe {
getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IP, sys::IP_HDRINCL)
@@ -1062,8 +1067,11 @@ impl Socket {
/// [raw(7)]: https://man7.org/linux/man-pages/man7/raw.7.html
/// [`IP_TTL`]: Socket::set_ttl
/// [`IP_TOS`]: Socket::set_tos
- #[cfg(all(feature = "all", not(target_os = "redox")))]
- #[cfg_attr(docsrs, doc(all(feature = "all", not(target_os = "redox"))))]
+ #[cfg(all(feature = "all", not(any(target_os = "redox", target_os = "espidf"))))]
+ #[cfg_attr(
+ docsrs,
+ doc(cfg(all(feature = "all", not(any(target_os = "redox", target_os = "espidf")))))
+ )]
pub fn set_header_included(&self, included: bool) -> io::Result<()> {
unsafe {
setsockopt(
@@ -1166,6 +1174,8 @@ impl Socket {
target_os = "redox",
target_os = "solaris",
target_os = "nto",
+ target_os = "espidf",
+ target_os = "vita",
)))]
pub fn join_multicast_v4_n(
&self,
@@ -1196,6 +1206,8 @@ impl Socket {
target_os = "redox",
target_os = "solaris",
target_os = "nto",
+ target_os = "espidf",
+ target_os = "vita",
)))]
pub fn leave_multicast_v4_n(
&self,
@@ -1228,6 +1240,8 @@ impl Socket {
target_os = "redox",
target_os = "fuchsia",
target_os = "nto",
+ target_os = "espidf",
+ target_os = "vita",
)))]
pub fn join_ssm_v4(
&self,
@@ -1263,6 +1277,8 @@ impl Socket {
target_os = "redox",
target_os = "fuchsia",
target_os = "nto",
+ target_os = "espidf",
+ target_os = "vita",
)))]
pub fn leave_ssm_v4(
&self,
@@ -1439,6 +1455,8 @@ impl Socket {
target_os = "solaris",
target_os = "windows",
target_os = "nto",
+ target_os = "espidf",
+ target_os = "vita",
)))]
pub fn set_recv_tos(&self, recv_tos: bool) -> io::Result<()> {
let recv_tos = if recv_tos { 1 } else { 0 };
@@ -1468,6 +1486,8 @@ impl Socket {
target_os = "solaris",
target_os = "windows",
target_os = "nto",
+ target_os = "espidf",
+ target_os = "vita",
)))]
pub fn recv_tos(&self) -> io::Result<bool> {
unsafe {
@@ -1684,14 +1704,24 @@ impl Socket {
doc,
all(
feature = "all",
- not(any(windows, target_os = "haiku", target_os = "openbsd"))
+ not(any(
+ windows,
+ target_os = "haiku",
+ target_os = "openbsd",
+ target_os = "vita"
+ ))
)
))]
#[cfg_attr(
docsrs,
doc(cfg(all(
feature = "all",
- not(any(windows, target_os = "haiku", target_os = "openbsd"))
+ not(any(
+ windows,
+ target_os = "haiku",
+ target_os = "openbsd",
+ target_os = "vita"
+ ))
)))
)]
pub fn keepalive_time(&self) -> io::Result<Duration> {