Skip to content

Commit

Permalink
xrOS support
Browse files Browse the repository at this point in the history
  • Loading branch information
agg23 committed Feb 25, 2024
1 parent 3d0b15b commit 06bda59
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const ALLOWED_CFGS: &'static [&'static str] = &[

// Extra values to allow for check-cfg.
const CHECK_CFG_EXTRA: &'static [(&'static str, &'static [&'static str])] = &[
("target_os", &["switch", "aix", "ohos", "hurd"]),
("target_os", &["switch", "aix", "ohos", "hurd", "xros"]),
("target_env", &["illumos", "wasi", "aix", "ohos"]),
(
"target_arch",
Expand Down
2 changes: 1 addition & 1 deletion src/unix/bsd/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6242,7 +6242,7 @@ cfg_if! {
}
}
cfg_if! {
if #[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))] {
if #[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos", target_os = "xros"))] {
extern "C" {
pub fn memmem(
haystack: *const ::c_void,
Expand Down
3 changes: 2 additions & 1 deletion src/unix/bsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ s! {
target_os = "ios",
target_os = "tvos",
target_os = "watchos",
target_os = "xros",
target_os = "netbsd",
target_os = "openbsd")))]
pub pw_fields: ::c_int,
Expand Down Expand Up @@ -924,7 +925,7 @@ cfg_if! {
}

cfg_if! {
if #[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos", target_os = "watchos"))] {
if #[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos", target_os = "watchos", target_os = "xros"))] {
mod apple;
pub use self::apple::*;
} else if #[cfg(any(target_os = "openbsd", target_os = "netbsd"))] {
Expand Down
8 changes: 6 additions & 2 deletions src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ cfg_if! {
target_os = "ios",
target_os = "tvos",
target_os = "watchos",
target_os = "xros",
target_os = "android",
target_os = "openbsd",
target_os = "nto",
Expand Down Expand Up @@ -1018,7 +1019,8 @@ extern "C" {
target_os = "macos",
target_os = "ios",
target_os = "tvos",
target_os = "watchos"
target_os = "watchos",
target_os = "xros"
),
link_name = "realpath$DARWIN_EXTSN"
)]
Expand Down Expand Up @@ -1186,7 +1188,8 @@ extern "C" {
target_os = "macos",
target_os = "ios",
target_os = "tvos",
target_os = "watchos"
target_os = "watchos",
target_os = "xros"
),
link_name = "res_9_init"
)]
Expand Down Expand Up @@ -1523,6 +1526,7 @@ cfg_if! {
target_os = "ios",
target_os = "tvos",
target_os = "watchos",
target_os = "xros",
target_os = "freebsd",
target_os = "dragonfly",
target_os = "openbsd",
Expand Down

0 comments on commit 06bda59

Please sign in to comment.