Skip to content

Commit 06bda59

Browse files
committed
xrOS support
1 parent 3d0b15b commit 06bda59

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

build.rs

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

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

src/unix/bsd/apple/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6242,7 +6242,7 @@ cfg_if! {
62426242
}
62436243
}
62446244
cfg_if! {
6245-
if #[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))] {
6245+
if #[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos", target_os = "xros"))] {
62466246
extern "C" {
62476247
pub fn memmem(
62486248
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 = "xros",
4243
target_os = "netbsd",
4344
target_os = "openbsd")))]
4445
pub pw_fields: ::c_int,
@@ -924,7 +925,7 @@ cfg_if! {
924925
}
925926

926927
cfg_if! {
927-
if #[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos", target_os = "watchos"))] {
928+
if #[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos", target_os = "watchos", target_os = "xros"))] {
928929
mod apple;
929930
pub use self::apple::*;
930931
} 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 = "xros",
372373
target_os = "android",
373374
target_os = "openbsd",
374375
target_os = "nto",
@@ -1018,7 +1019,8 @@ extern "C" {
10181019
target_os = "macos",
10191020
target_os = "ios",
10201021
target_os = "tvos",
1021-
target_os = "watchos"
1022+
target_os = "watchos",
1023+
target_os = "xros"
10221024
),
10231025
link_name = "realpath$DARWIN_EXTSN"
10241026
)]
@@ -1186,7 +1188,8 @@ extern "C" {
11861188
target_os = "macos",
11871189
target_os = "ios",
11881190
target_os = "tvos",
1189-
target_os = "watchos"
1191+
target_os = "watchos",
1192+
target_os = "xros"
11901193
),
11911194
link_name = "res_9_init"
11921195
)]
@@ -1523,6 +1526,7 @@ cfg_if! {
15231526
target_os = "ios",
15241527
target_os = "tvos",
15251528
target_os = "watchos",
1529+
target_os = "xros",
15261530
target_os = "freebsd",
15271531
target_os = "dragonfly",
15281532
target_os = "openbsd",

0 commit comments

Comments
 (0)