Skip to content

Commit eb1bad8

Browse files
authored
Merge pull request #3568 from agg23/main
visionOS Support
2 parents ba73a3e + b5f85fc commit eb1bad8

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed

build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const ALLOWED_CFGS: &'static [&'static str] = &[
3434

3535
// Extra values to allow for check-cfg.
3636
const CHECK_CFG_EXTRA: &'static [(&'static str, &'static [&'static str])] = &[
37-
("target_os", &["switch", "aix", "ohos", "hurd"]),
37+
("target_os", &["switch", "aix", "ohos", "hurd", "visionos"]),
3838
("target_env", &["illumos", "wasi", "aix", "ohos"]),
3939
(
4040
"target_arch",

libc-test/build.rs

+3
Original file line numberDiff line numberDiff line change
@@ -2538,6 +2538,9 @@ fn test_freebsd(target: &str) {
25382538
| "sctp_send_failed_event"
25392539
| "sctp_stream_reset_event" => true,
25402540

2541+
// FIXME: Changed in FreeBSD 15
2542+
"tcp_info" | "sockstat" if Some(15) >= freebsd_ver => true,
2543+
25412544
_ => false,
25422545
}
25432546
});

src/unix/bsd/apple/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6475,7 +6475,7 @@ cfg_if! {
64756475
}
64766476
}
64776477
cfg_if! {
6478-
if #[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))] {
6478+
if #[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos", target_os = "visionos"))] {
64796479
extern "C" {
64806480
pub fn memmem(
64816481
haystack: *const ::c_void,

src/unix/bsd/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ s! {
3939
target_os = "ios",
4040
target_os = "tvos",
4141
target_os = "watchos",
42+
target_os = "visionos",
4243
target_os = "netbsd",
4344
target_os = "openbsd")))]
4445
pub pw_fields: ::c_int,
@@ -917,7 +918,7 @@ extern "C" {
917918
}
918919

919920
cfg_if! {
920-
if #[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos", target_os = "watchos"))] {
921+
if #[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos", target_os = "watchos", target_os = "visionos"))] {
921922
mod apple;
922923
pub use self::apple::*;
923924
} else if #[cfg(any(target_os = "openbsd", target_os = "netbsd"))] {

src/unix/mod.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ cfg_if! {
369369
target_os = "ios",
370370
target_os = "tvos",
371371
target_os = "watchos",
372+
target_os = "visionos",
372373
target_os = "android",
373374
target_os = "openbsd",
374375
target_os = "nto",
@@ -1042,7 +1043,8 @@ extern "C" {
10421043
target_os = "macos",
10431044
target_os = "ios",
10441045
target_os = "tvos",
1045-
target_os = "watchos"
1046+
target_os = "watchos",
1047+
target_os = "visionos"
10461048
),
10471049
link_name = "realpath$DARWIN_EXTSN"
10481050
)]
@@ -1218,7 +1220,8 @@ extern "C" {
12181220
target_os = "macos",
12191221
target_os = "ios",
12201222
target_os = "tvos",
1221-
target_os = "watchos"
1223+
target_os = "watchos",
1224+
target_os = "visionos"
12221225
),
12231226
link_name = "res_9_init"
12241227
)]
@@ -1555,6 +1558,7 @@ cfg_if! {
15551558
target_os = "ios",
15561559
target_os = "tvos",
15571560
target_os = "watchos",
1561+
target_os = "visionos",
15581562
target_os = "freebsd",
15591563
target_os = "dragonfly",
15601564
target_os = "openbsd",

0 commit comments

Comments
 (0)