Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for tvOS #2958

Merged
merged 1 commit into from Oct 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/unix/bsd/mod.rs
Expand Up @@ -37,6 +37,7 @@ s! {

#[cfg(not(any(target_os = "macos",
target_os = "ios",
target_os = "tvos",
target_os = "watchos",
target_os = "netbsd",
target_os = "openbsd")))]
Expand Down Expand Up @@ -887,7 +888,7 @@ extern "C" {
}

cfg_if! {
if #[cfg(any(target_os = "macos", target_os = "ios", target_os = "watchos"))] {
if #[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos", target_os = "watchos"))] {
mod apple;
pub use self::apple::*;
} else if #[cfg(any(target_os = "openbsd", target_os = "netbsd"))] {
Expand Down
16 changes: 14 additions & 2 deletions src/unix/mod.rs
Expand Up @@ -356,6 +356,7 @@ cfg_if! {
extern {}
} else if #[cfg(any(target_os = "macos",
target_os = "ios",
target_os = "tvos",
target_os = "watchos",
target_os = "android",
target_os = "openbsd"))] {
Expand Down Expand Up @@ -1030,7 +1031,12 @@ extern "C" {
pub fn getrusage(resource: ::c_int, usage: *mut rusage) -> ::c_int;

#[cfg_attr(
any(target_os = "macos", target_os = "ios", target_os = "watchos"),
any(
target_os = "macos",
target_os = "ios",
target_os = "tvos",
target_os = "watchos"
),
link_name = "realpath$DARWIN_EXTSN"
)]
pub fn realpath(pathname: *const ::c_char, resolved: *mut ::c_char) -> *mut ::c_char;
Expand Down Expand Up @@ -1197,7 +1203,12 @@ extern "C" {
link_name = "__res_init"
)]
#[cfg_attr(
any(target_os = "macos", target_os = "ios", target_os = "watchos"),
any(
target_os = "macos",
target_os = "ios",
target_os = "tvos",
target_os = "watchos"
),
link_name = "res_9_init"
)]
pub fn res_init() -> ::c_int;
Expand Down Expand Up @@ -1483,6 +1494,7 @@ cfg_if! {
pub use self::linux_like::*;
} else if #[cfg(any(target_os = "macos",
target_os = "ios",
target_os = "tvos",
target_os = "watchos",
target_os = "freebsd",
target_os = "dragonfly",
Expand Down