Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Apple watchOS support #6176

Merged
merged 1 commit into from Nov 29, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 12 additions & 2 deletions tokio-util/tests/udp.rs
Expand Up @@ -14,7 +14,12 @@ use std::io;
use std::sync::Arc;

#[cfg_attr(
any(target_os = "macos", target_os = "ios", target_os = "tvos"),
any(
target_os = "macos",
target_os = "ios",
target_os = "tvos",
target_os = "watchos"
),
allow(unused_assignments)
)]
#[tokio::test]
Expand Down Expand Up @@ -44,7 +49,12 @@ async fn send_framed_byte_codec() -> std::io::Result<()> {
b_soc = b.into_inner();
}

#[cfg(not(any(target_os = "macos", target_os = "ios", target_os = "tvos")))]
#[cfg(not(any(
target_os = "macos",
target_os = "ios",
target_os = "tvos",
target_os = "watchos"
)))]
// test sending & receiving an empty message
{
let mut a = UdpFramed::new(a_soc, ByteCodec);
Expand Down
14 changes: 12 additions & 2 deletions tokio/src/net/unix/ucred.rs
Expand Up @@ -45,7 +45,12 @@ pub(crate) use self::impl_netbsd::get_peer_cred;
#[cfg(any(target_os = "dragonfly", target_os = "freebsd"))]
pub(crate) use self::impl_bsd::get_peer_cred;

#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
#[cfg(any(
target_os = "macos",
target_os = "ios",
target_os = "tvos",
target_os = "watchos"
))]
pub(crate) use self::impl_macos::get_peer_cred;

#[cfg(any(target_os = "solaris", target_os = "illumos"))]
Expand Down Expand Up @@ -187,7 +192,12 @@ pub(crate) mod impl_bsd {
}
}

#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
#[cfg(any(
target_os = "macos",
target_os = "ios",
target_os = "tvos",
target_os = "watchos"
))]
pub(crate) mod impl_macos {
use crate::net::unix::{self, UnixStream};

Expand Down