Skip to content

Commit

Permalink
Add tvOS and watchOS
Browse files Browse the repository at this point in the history
Follow up to commit 28c02ca.
  • Loading branch information
Thomasdezeeuw committed Feb 25, 2023
1 parent 765003a commit d1be18d
Show file tree
Hide file tree
Showing 5 changed files with 210 additions and 22 deletions.
8 changes: 8 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,8 @@ impl TcpKeepalive {
target_os = "linux",
target_os = "macos",
target_os = "netbsd",
target_os = "tvos",
target_os = "watchos",
target_os = "windows",
))]
#[cfg_attr(
Expand All @@ -491,6 +493,8 @@ impl TcpKeepalive {
target_os = "linux",
target_os = "macos",
target_os = "netbsd",
target_os = "tvos",
target_os = "watchos",
target_os = "windows",
)))
)]
Expand All @@ -517,6 +521,8 @@ impl TcpKeepalive {
target_os = "linux",
target_os = "macos",
target_os = "netbsd",
target_os = "tvos",
target_os = "watchos",
)
))]
#[cfg_attr(
Expand All @@ -533,6 +539,8 @@ impl TcpKeepalive {
target_os = "linux",
target_os = "macos",
target_os = "netbsd",
target_os = "tvos",
target_os = "watchos",
)
)))
)]
Expand Down
4 changes: 3 additions & 1 deletion src/sockaddr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,11 @@ impl fmt::Debug for SockAddr {
target_os = "ios",
target_os = "macos",
target_os = "netbsd",
target_os = "nto",
target_os = "openbsd",
target_os = "tvos",
target_os = "vxworks",
target_os = "nto",
target_os = "watchos",
))]
f.field("ss_len", &self.storage.ss_len);
f.field("ss_family", &self.storage.ss_family)
Expand Down
15 changes: 14 additions & 1 deletion src/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,12 @@ fn set_common_flags(socket: Socket) -> io::Result<Socket> {
socket._set_cloexec(true)?;

// On Apple platforms set `NOSIGPIPE`.
#[cfg(any(target_os = "ios", target_os = "macos"))]
#[cfg(any(
target_os = "ios",
target_os = "macos",
target_os = "tvos",
target_os = "watchos",
))]
socket._set_nosigpipe(true)?;

Ok(socket)
Expand Down Expand Up @@ -1798,6 +1803,8 @@ impl Socket {
target_os = "linux",
target_os = "macos",
target_os = "netbsd",
target_os = "tvos",
target_os = "watchos",
)
))]
#[cfg_attr(
Expand All @@ -1814,6 +1821,8 @@ impl Socket {
target_os = "linux",
target_os = "macos",
target_os = "netbsd",
target_os = "tvos",
target_os = "watchos",
)
)))
)]
Expand Down Expand Up @@ -1841,6 +1850,8 @@ impl Socket {
target_os = "linux",
target_os = "macos",
target_os = "netbsd",
target_os = "tvos",
target_os = "watchos",
)
))]
#[cfg_attr(
Expand All @@ -1857,6 +1868,8 @@ impl Socket {
target_os = "linux",
target_os = "macos",
target_os = "netbsd",
target_os = "tvos",
target_os = "watchos",
)
)))
)]
Expand Down
Loading

0 comments on commit d1be18d

Please sign in to comment.