Skip to content

Commit a859137

Browse files
committed
Add tvOS and watchOS
Follow up to commit 28c02ca.
1 parent 765003a commit a859137

File tree

5 files changed

+210
-22
lines changed

5 files changed

+210
-22
lines changed

src/lib.rs

+8
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,8 @@ impl TcpKeepalive {
477477
target_os = "linux",
478478
target_os = "macos",
479479
target_os = "netbsd",
480+
target_os = "tvos",
481+
target_os = "watchos",
480482
target_os = "windows",
481483
))]
482484
#[cfg_attr(
@@ -491,6 +493,8 @@ impl TcpKeepalive {
491493
target_os = "linux",
492494
target_os = "macos",
493495
target_os = "netbsd",
496+
target_os = "tvos",
497+
target_os = "watchos",
494498
target_os = "windows",
495499
)))
496500
)]
@@ -517,6 +521,8 @@ impl TcpKeepalive {
517521
target_os = "linux",
518522
target_os = "macos",
519523
target_os = "netbsd",
524+
target_os = "tvos",
525+
target_os = "watchos",
520526
)
521527
))]
522528
#[cfg_attr(
@@ -533,6 +539,8 @@ impl TcpKeepalive {
533539
target_os = "linux",
534540
target_os = "macos",
535541
target_os = "netbsd",
542+
target_os = "tvos",
543+
target_os = "watchos",
536544
)
537545
)))
538546
)]

src/sockaddr.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -303,9 +303,11 @@ impl fmt::Debug for SockAddr {
303303
target_os = "ios",
304304
target_os = "macos",
305305
target_os = "netbsd",
306+
target_os = "nto",
306307
target_os = "openbsd",
308+
target_os = "tvos",
307309
target_os = "vxworks",
308-
target_os = "nto",
310+
target_os = "watchos",
309311
))]
310312
f.field("ss_len", &self.storage.ss_len);
311313
f.field("ss_family", &self.storage.ss_family)

src/socket.rs

+14-1
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,12 @@ fn set_common_flags(socket: Socket) -> io::Result<Socket> {
770770
socket._set_cloexec(true)?;
771771

772772
// On Apple platforms set `NOSIGPIPE`.
773-
#[cfg(any(target_os = "ios", target_os = "macos"))]
773+
#[cfg(any(
774+
target_os = "ios",
775+
target_os = "macos",
776+
target_os = "tvos",
777+
target_os = "watchos",
778+
))]
774779
socket._set_nosigpipe(true)?;
775780

776781
Ok(socket)
@@ -1798,6 +1803,8 @@ impl Socket {
17981803
target_os = "linux",
17991804
target_os = "macos",
18001805
target_os = "netbsd",
1806+
target_os = "tvos",
1807+
target_os = "watchos",
18011808
)
18021809
))]
18031810
#[cfg_attr(
@@ -1814,6 +1821,8 @@ impl Socket {
18141821
target_os = "linux",
18151822
target_os = "macos",
18161823
target_os = "netbsd",
1824+
target_os = "tvos",
1825+
target_os = "watchos",
18171826
)
18181827
)))
18191828
)]
@@ -1841,6 +1850,8 @@ impl Socket {
18411850
target_os = "linux",
18421851
target_os = "macos",
18431852
target_os = "netbsd",
1853+
target_os = "tvos",
1854+
target_os = "watchos",
18441855
)
18451856
))]
18461857
#[cfg_attr(
@@ -1857,6 +1868,8 @@ impl Socket {
18571868
target_os = "linux",
18581869
target_os = "macos",
18591870
target_os = "netbsd",
1871+
target_os = "tvos",
1872+
target_os = "watchos",
18601873
)
18611874
)))
18621875
)]

0 commit comments

Comments
 (0)