summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-10-13 01:28:06 +0000
committerbors <bors@rust-lang.org>2022-10-13 01:28:06 +0000
commite4e865d1c3bd3b7741fa408da8e145e7dd8724b3 (patch)
tree297ada79d5403f2ea02eb269c776094b5523cf77
parent9960e1cdcc7dfe1cf2acc89ad061d044f66aa076 (diff)
parentbf618c96afaed3f1332832a431ff48637f09248e (diff)
downloadrust-libc-e4e865d1c3bd3b7741fa408da8e145e7dd8724b3.tar.gz
Auto merge of #2958 - thomcc:tvos-support, r=JohnTitor
Add support for tvOS This is essentially identical to the iOS support, as the OS is... essentially identical to iOS.
-rw-r--r--src/unix/bsd/mod.rs3
-rw-r--r--src/unix/mod.rs16
2 files changed, 16 insertions, 3 deletions
diff --git a/src/unix/bsd/mod.rs b/src/unix/bsd/mod.rs
index 20e203bde3..50177015a9 100644
--- a/src/unix/bsd/mod.rs
+++ b/src/unix/bsd/mod.rs
@@ -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")))]
@@ -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"))] {
diff --git a/src/unix/mod.rs b/src/unix/mod.rs
index ecc693e3db..16b69bb86b 100644
--- a/src/unix/mod.rs
+++ b/src/unix/mod.rs
@@ -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"))] {
@@ -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;
@@ -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;
@@ -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",