@@ -18,6 +18,7 @@ use std::net::{Ipv4Addr, Ipv6Addr};
1818 feature = "all" ,
1919 any(
2020 target_os = "ios" ,
21+ target_os = "visionos" ,
2122 target_os = "macos" ,
2223 target_os = "tvos" ,
2324 target_os = "watchos" ,
@@ -31,6 +32,7 @@ use std::num::NonZeroU32;
3132 target_os = "android" ,
3233 target_os = "freebsd" ,
3334 target_os = "ios" ,
35+ target_os = "visionos" ,
3436 target_os = "linux" ,
3537 target_os = "macos" ,
3638 target_os = "tvos" ,
@@ -46,6 +48,7 @@ use std::os::unix::ffi::OsStrExt;
4648 target_os = "android" ,
4749 target_os = "freebsd" ,
4850 target_os = "ios" ,
51+ target_os = "visionos" ,
4952 target_os = "linux" ,
5053 target_os = "macos" ,
5154 target_os = "tvos" ,
@@ -63,6 +66,7 @@ use std::{io, slice};
6366
6467#[ cfg( not( any(
6568 target_os = "ios" ,
69+ target_os = "visionos" ,
6670 target_os = "macos" ,
6771 target_os = "tvos" ,
6872 target_os = "watchos" ,
@@ -160,13 +164,15 @@ pub(crate) use libc::IP_RECVTOS;
160164pub ( crate ) use libc:: IP_TOS ;
161165#[ cfg( not( any(
162166 target_os = "ios" ,
167+ target_os = "visionos" ,
163168 target_os = "macos" ,
164169 target_os = "tvos" ,
165170 target_os = "watchos" ,
166171) ) ) ]
167172pub ( crate ) use libc:: SO_LINGER ;
168173#[ cfg( any(
169174 target_os = "ios" ,
175+ target_os = "visionos" ,
170176 target_os = "macos" ,
171177 target_os = "tvos" ,
172178 target_os = "watchos" ,
@@ -202,6 +208,7 @@ pub(crate) use libc::{
202208 target_os = "haiku" ,
203209 target_os = "illumos" ,
204210 target_os = "ios" ,
211+ target_os = "visionos" ,
205212 target_os = "macos" ,
206213 target_os = "netbsd" ,
207214 target_os = "nto" ,
@@ -217,6 +224,7 @@ pub(crate) use libc::{IPV6_ADD_MEMBERSHIP, IPV6_DROP_MEMBERSHIP};
217224 target_os = "haiku" ,
218225 target_os = "illumos" ,
219226 target_os = "ios" ,
227+ target_os = "visionos" ,
220228 target_os = "macos" ,
221229 target_os = "netbsd" ,
222230 target_os = "openbsd" ,
@@ -236,6 +244,7 @@ pub(crate) use libc::{
236244 target_os = "fuchsia" ,
237245 target_os = "illumos" ,
238246 target_os = "ios" ,
247+ target_os = "visionos" ,
239248 target_os = "linux" ,
240249 target_os = "macos" ,
241250 target_os = "netbsd" ,
@@ -250,6 +259,7 @@ pub(crate) type Bool = c_int;
250259
251260#[ cfg( any(
252261 target_os = "ios" ,
262+ target_os = "visionos" ,
253263 target_os = "macos" ,
254264 target_os = "nto" ,
255265 target_os = "tvos" ,
@@ -259,6 +269,7 @@ use libc::TCP_KEEPALIVE as KEEPALIVE_TIME;
259269#[ cfg( not( any(
260270 target_os = "haiku" ,
261271 target_os = "ios" ,
272+ target_os = "visionos" ,
262273 target_os = "macos" ,
263274 target_os = "nto" ,
264275 target_os = "openbsd" ,
@@ -284,6 +295,7 @@ macro_rules! syscall {
284295/// Maximum size of a buffer passed to system call like `recv` and `send`.
285296#[ cfg( not( any(
286297 target_os = "ios" ,
298+ target_os = "visionos" ,
287299 target_os = "macos" ,
288300 target_os = "tvos" ,
289301 target_os = "watchos" ,
@@ -300,6 +312,7 @@ const MAX_BUF_LEN: usize = ssize_t::MAX as usize;
300312// both platforms.
301313#[ cfg( any(
302314 target_os = "ios" ,
315+ target_os = "visionos" ,
303316 target_os = "macos" ,
304317 target_os = "tvos" ,
305318 target_os = "watchos" ,
@@ -339,6 +352,7 @@ type IovLen = usize;
339352 target_os = "hurd" ,
340353 target_os = "illumos" ,
341354 target_os = "ios" ,
355+ target_os = "visionos" ,
342356 target_os = "macos" ,
343357 target_os = "netbsd" ,
344358 target_os = "nto" ,
@@ -1234,6 +1248,7 @@ pub(crate) fn set_tcp_keepalive(fd: Socket, keepalive: &TcpKeepalive) -> io::Res
12341248 target_os = "hurd" ,
12351249 target_os = "illumos" ,
12361250 target_os = "ios" ,
1251+ target_os = "visionos" ,
12371252 target_os = "linux" ,
12381253 target_os = "macos" ,
12391254 target_os = "netbsd" ,
@@ -1462,6 +1477,7 @@ impl crate::Socket {
14621477 #[ cfg_attr(
14631478 any(
14641479 target_os = "ios" ,
1480+ target_os = "visionos" ,
14651481 target_os = "macos" ,
14661482 target_os = "tvos" ,
14671483 target_os = "watchos"
@@ -1498,6 +1514,7 @@ impl crate::Socket {
14981514 feature = "all" ,
14991515 any(
15001516 target_os = "ios" ,
1517+ target_os = "visionos" ,
15011518 target_os = "macos" ,
15021519 target_os = "tvos" ,
15031520 target_os = "watchos" ,
@@ -1509,6 +1526,7 @@ impl crate::Socket {
15091526 feature = "all" ,
15101527 any(
15111528 target_os = "ios" ,
1529+ target_os = "visionos" ,
15121530 target_os = "macos" ,
15131531 target_os = "tvos" ,
15141532 target_os = "watchos" ,
@@ -1521,6 +1539,7 @@ impl crate::Socket {
15211539
15221540 #[ cfg( any(
15231541 target_os = "ios" ,
1542+ target_os = "visionos" ,
15241543 target_os = "macos" ,
15251544 target_os = "tvos" ,
15261545 target_os = "watchos" ,
@@ -1957,6 +1976,7 @@ impl crate::Socket {
19571976 feature = "all" ,
19581977 any(
19591978 target_os = "ios" ,
1979+ target_os = "visionos" ,
19601980 target_os = "macos" ,
19611981 target_os = "tvos" ,
19621982 target_os = "watchos" ,
@@ -1968,6 +1988,7 @@ impl crate::Socket {
19681988 feature = "all" ,
19691989 any(
19701990 target_os = "ios" ,
1991+ target_os = "visionos" ,
19711992 target_os = "macos" ,
19721993 target_os = "tvos" ,
19731994 target_os = "watchos" ,
@@ -1993,6 +2014,7 @@ impl crate::Socket {
19932014 feature = "all" ,
19942015 any(
19952016 target_os = "ios" ,
2017+ target_os = "visionos" ,
19962018 target_os = "macos" ,
19972019 target_os = "tvos" ,
19982020 target_os = "watchos" ,
@@ -2004,6 +2026,7 @@ impl crate::Socket {
20042026 feature = "all" ,
20052027 any(
20062028 target_os = "ios" ,
2029+ target_os = "visionos" ,
20072030 target_os = "macos" ,
20082031 target_os = "tvos" ,
20092032 target_os = "watchos" ,
@@ -2029,6 +2052,7 @@ impl crate::Socket {
20292052 feature = "all" ,
20302053 any(
20312054 target_os = "ios" ,
2055+ target_os = "visionos" ,
20322056 target_os = "macos" ,
20332057 target_os = "tvos" ,
20342058 target_os = "watchos" ,
@@ -2040,6 +2064,7 @@ impl crate::Socket {
20402064 feature = "all" ,
20412065 any(
20422066 target_os = "ios" ,
2067+ target_os = "visionos" ,
20432068 target_os = "macos" ,
20442069 target_os = "tvos" ,
20452070 target_os = "watchos" ,
@@ -2060,6 +2085,7 @@ impl crate::Socket {
20602085 feature = "all" ,
20612086 any(
20622087 target_os = "ios" ,
2088+ target_os = "visionos" ,
20632089 target_os = "macos" ,
20642090 target_os = "tvos" ,
20652091 target_os = "watchos" ,
@@ -2071,6 +2097,7 @@ impl crate::Socket {
20712097 feature = "all" ,
20722098 any(
20732099 target_os = "ios" ,
2100+ target_os = "visionos" ,
20742101 target_os = "macos" ,
20752102 target_os = "tvos" ,
20762103 target_os = "watchos" ,
@@ -2088,6 +2115,7 @@ impl crate::Socket {
20882115 feature = "all" ,
20892116 any(
20902117 target_os = "ios" ,
2118+ target_os = "visionos" ,
20912119 target_os = "macos" ,
20922120 target_os = "tvos" ,
20932121 target_os = "watchos" ,
@@ -2099,6 +2127,7 @@ impl crate::Socket {
20992127 feature = "all" ,
21002128 any(
21012129 target_os = "ios" ,
2130+ target_os = "visionos" ,
21022131 target_os = "macos" ,
21032132 target_os = "tvos" ,
21042133 target_os = "watchos" ,
@@ -2119,6 +2148,7 @@ impl crate::Socket {
21192148 feature = "all" ,
21202149 any(
21212150 target_os = "ios" ,
2151+ target_os = "visionos" ,
21222152 target_os = "macos" ,
21232153 target_os = "tvos" ,
21242154 target_os = "watchos" ,
@@ -2130,6 +2160,7 @@ impl crate::Socket {
21302160 feature = "all" ,
21312161 any(
21322162 target_os = "ios" ,
2163+ target_os = "visionos" ,
21332164 target_os = "macos" ,
21342165 target_os = "tvos" ,
21352166 target_os = "watchos" ,
@@ -2453,6 +2484,7 @@ impl crate::Socket {
24532484 target_os = "android" ,
24542485 target_os = "freebsd" ,
24552486 target_os = "ios" ,
2487+ target_os = "visionos" ,
24562488 target_os = "linux" ,
24572489 target_os = "macos" ,
24582490 target_os = "tvos" ,
@@ -2468,6 +2500,7 @@ impl crate::Socket {
24682500 target_os = "android" ,
24692501 target_os = "freebsd" ,
24702502 target_os = "ios" ,
2503+ target_os = "visionos" ,
24712504 target_os = "linux" ,
24722505 target_os = "macos" ,
24732506 target_os = "tvos" ,
@@ -2491,6 +2524,7 @@ impl crate::Socket {
24912524 feature = "all" ,
24922525 any(
24932526 target_os = "ios" ,
2527+ target_os = "visionos" ,
24942528 target_os = "macos" ,
24952529 target_os = "tvos" ,
24962530 target_os = "watchos" ,
0 commit comments