summaryrefslogtreecommitdiff
path: root/src/unix/mod.rs
diff options
context:
space:
mode:
authorVladimir Michael Eatwell <dimir@fb.com>2021-06-17 16:02:59 +0100
committerVladimir Michael Eatwell <dimir@fb.com>2022-03-08 12:02:25 +0000
commit98e59458c3980e8746802294b6306354a6c6a2a4 (patch)
tree71627d6ce8c617f53bb4ec3aeb985c9a0f404445 /src/unix/mod.rs
parent1708299c6b49e9fb7e7c34b9edd37c77e7af003c (diff)
downloadrust-libc-98e59458c3980e8746802294b6306354a6c6a2a4.tar.gz
[watch_os] add support for Apple WatchOS
Diffstat (limited to 'src/unix/mod.rs')
-rw-r--r--src/unix/mod.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/unix/mod.rs b/src/unix/mod.rs
index 5ff2294e79..2a5834ab5a 100644
--- a/src/unix/mod.rs
+++ b/src/unix/mod.rs
@@ -348,6 +348,7 @@ cfg_if! {
extern {}
} else if #[cfg(any(target_os = "macos",
target_os = "ios",
+ target_os = "watchos",
target_os = "android",
target_os = "openbsd"))] {
#[link(name = "c")]
@@ -1017,7 +1018,7 @@ extern "C" {
pub fn getrusage(resource: ::c_int, usage: *mut rusage) -> ::c_int;
#[cfg_attr(
- any(target_os = "macos", target_os = "ios"),
+ any(target_os = "macos", target_os = "ios", target_os = "watchos"),
link_name = "realpath$DARWIN_EXTSN"
)]
pub fn realpath(pathname: *const ::c_char, resolved: *mut ::c_char) -> *mut ::c_char;
@@ -1183,7 +1184,7 @@ extern "C" {
),
link_name = "__res_init"
)]
- #[cfg_attr(any(target_os = "macos", target_os = "ios"), link_name = "res_9_init")]
+ #[cfg_attr(any(target_os = "macos", target_os = "ios", target_os = "watchos"), link_name = "res_9_init")]
pub fn res_init() -> ::c_int;
#[cfg_attr(target_os = "netbsd", link_name = "__gmtime_r50")]
@@ -1456,6 +1457,7 @@ cfg_if! {
pub use self::linux_like::*;
} else if #[cfg(any(target_os = "macos",
target_os = "ios",
+ target_os = "watchos",
target_os = "freebsd",
target_os = "dragonfly",
target_os = "openbsd",