Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ unexpected_cfgs = { level = "warn", check-cfg = [
'cfg(tokio_taskdump)',
'cfg(tokio_unstable)',
'cfg(tokio_uring)',
'cfg(target_os, values("cygwin"))',
] }
28 changes: 24 additions & 4 deletions tokio/src/net/tcp/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,20 @@ impl TcpSocket {
/// Ok(())
/// }
/// ```
#[cfg(all(unix, not(target_os = "solaris"), not(target_os = "illumos")))]
#[cfg(all(
unix,
not(target_os = "solaris"),
not(target_os = "illumos"),
not(target_os = "cygwin"),
))]
#[cfg_attr(
docsrs,
doc(cfg(all(unix, not(target_os = "solaris"), not(target_os = "illumos"))))
doc(cfg(all(
unix,
not(target_os = "solaris"),
not(target_os = "illumos"),
not(target_os = "cygwin"),
)))
)]
pub fn set_reuseport(&self, reuseport: bool) -> io::Result<()> {
self.inner.set_reuse_port(reuseport)
Expand Down Expand Up @@ -311,10 +321,20 @@ impl TcpSocket {
/// Ok(())
/// }
/// ```
#[cfg(all(unix, not(target_os = "solaris"), not(target_os = "illumos")))]
#[cfg(all(
unix,
not(target_os = "solaris"),
not(target_os = "illumos"),
not(target_os = "cygwin"),
))]
#[cfg_attr(
docsrs,
doc(cfg(all(unix, not(target_os = "solaris"), not(target_os = "illumos"))))
doc(cfg(all(
unix,
not(target_os = "solaris"),
not(target_os = "illumos"),
not(target_os = "cygwin"),
)))
)]
pub fn reuseport(&self) -> io::Result<bool> {
self.inner.reuse_port()
Expand Down
9 changes: 6 additions & 3 deletions tokio/src/net/unix/ucred.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ impl UCred {
target_os = "redox",
target_os = "android",
target_os = "openbsd",
target_os = "haiku"
target_os = "haiku",
target_os = "cygwin"
))]
pub(crate) use self::impl_linux::get_peer_cred;

Expand Down Expand Up @@ -69,7 +70,8 @@ pub(crate) use self::impl_noproc::get_peer_cred;
target_os = "redox",
target_os = "android",
target_os = "openbsd",
target_os = "haiku"
target_os = "haiku",
target_os = "cygwin"
))]
pub(crate) mod impl_linux {
use crate::net::unix::{self, UnixStream};
Expand All @@ -83,7 +85,8 @@ pub(crate) mod impl_linux {
target_os = "linux",
target_os = "redox",
target_os = "android",
target_os = "haiku"
target_os = "haiku",
target_os = "cygwin"
))]
use libc::ucred;

Expand Down
Loading