Skip to content

Commit 52b29b3

Browse files
authored
net: add apple tvos support (#6045)
1 parent eaba971 commit 52b29b3

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

tokio-util/tests/udp.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ use futures::sink::SinkExt;
1313
use std::io;
1414
use std::sync::Arc;
1515

16-
#[cfg_attr(any(target_os = "macos", target_os = "ios"), allow(unused_assignments))]
16+
#[cfg_attr(
17+
any(target_os = "macos", target_os = "ios", target_os = "tvos"),
18+
allow(unused_assignments)
19+
)]
1720
#[tokio::test]
1821
async fn send_framed_byte_codec() -> std::io::Result<()> {
1922
let mut a_soc = UdpSocket::bind("127.0.0.1:0").await?;
@@ -41,7 +44,7 @@ async fn send_framed_byte_codec() -> std::io::Result<()> {
4144
b_soc = b.into_inner();
4245
}
4346

44-
#[cfg(not(any(target_os = "macos", target_os = "ios")))]
47+
#[cfg(not(any(target_os = "macos", target_os = "ios", target_os = "tvos")))]
4548
// test sending & receiving an empty message
4649
{
4750
let mut a = UdpFramed::new(a_soc, ByteCodec);

tokio/src/net/unix/ucred.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub(crate) use self::impl_netbsd::get_peer_cred;
4545
#[cfg(any(target_os = "dragonfly", target_os = "freebsd"))]
4646
pub(crate) use self::impl_bsd::get_peer_cred;
4747

48-
#[cfg(any(target_os = "macos", target_os = "ios"))]
48+
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
4949
pub(crate) use self::impl_macos::get_peer_cred;
5050

5151
#[cfg(any(target_os = "solaris", target_os = "illumos"))]
@@ -187,7 +187,7 @@ pub(crate) mod impl_bsd {
187187
}
188188
}
189189

190-
#[cfg(any(target_os = "macos", target_os = "ios"))]
190+
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
191191
pub(crate) mod impl_macos {
192192
use crate::net::unix::{self, UnixStream};
193193

0 commit comments

Comments
 (0)