Skip to content

Commit ec51515

Browse files
agg23tgross35
authored andcommitted
xrOS support
Swapped to visionOS target_os (apply <rust-lang#3568> to `main`) [resolve conflicts - Trevor] (cherry picked from commit b5b0f69)
1 parent 2e4a84e commit ec51515

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

Diff for: build.rs

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

2222
// Extra values to allow for check-cfg.
2323
const CHECK_CFG_EXTRA: &'static [(&'static str, &'static [&'static str])] = &[
24-
("target_os", &["switch", "aix", "ohos", "hurd"]),
24+
("target_os", &["switch", "aix", "ohos", "hurd", "visionos"]),
2525
("target_env", &["illumos", "wasi", "aix", "ohos"]),
2626
(
2727
"target_arch",

Diff for: src/unix/bsd/apple/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6427,7 +6427,7 @@ cfg_if! {
64276427
}
64286428
}
64296429
cfg_if! {
6430-
if #[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))] {
6430+
if #[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos", target_os = "visionos"))] {
64316431
extern "C" {
64326432
pub fn memmem(
64336433
haystack: *const ::c_void,

Diff for: src/unix/bsd/mod.rs

+2-3
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,
@@ -921,10 +922,8 @@ cfg_if! {
921922
pub fn syscall(num: ::c_int, ...) -> ::c_int;
922923
}
923924
}
924-
}
925925

926-
cfg_if! {
927-
if #[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos", target_os = "watchos"))] {
926+
if #[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos", target_os = "watchos", target_os = "visionos"))] {
928927
mod apple;
929928
pub use self::apple::*;
930929
} else if #[cfg(any(target_os = "openbsd", target_os = "netbsd"))] {

Diff for: src/unix/mod.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ cfg_if! {
381381
target_os = "ios",
382382
target_os = "tvos",
383383
target_os = "watchos",
384+
target_os = "visionos",
384385
target_os = "android",
385386
target_os = "openbsd",
386387
target_os = "nto",
@@ -1043,7 +1044,8 @@ extern "C" {
10431044
target_os = "macos",
10441045
target_os = "ios",
10451046
target_os = "tvos",
1046-
target_os = "watchos"
1047+
target_os = "watchos",
1048+
target_os = "visionos"
10471049
),
10481050
link_name = "realpath$DARWIN_EXTSN"
10491051
)]
@@ -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
)]
@@ -1581,6 +1584,7 @@ cfg_if! {
15811584
target_os = "ios",
15821585
target_os = "tvos",
15831586
target_os = "watchos",
1587+
target_os = "visionos",
15841588
target_os = "freebsd",
15851589
target_os = "dragonfly",
15861590
target_os = "openbsd",

0 commit comments

Comments
 (0)