From e6ed8e1a5526838dffb0af3cd973525ffba23c8f Mon Sep 17 00:00:00 2001 From: Thom Chiovoloni Date: Mon, 24 Oct 2022 16:31:05 -0700 Subject: [PATCH] Add tvOS and watchOS support, identical to iOS support --- src/{ios.rs => apple-other.rs} | 0 src/lib.rs | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) rename src/{ios.rs => apple-other.rs} (100%) diff --git a/src/ios.rs b/src/apple-other.rs similarity index 100% rename from src/ios.rs rename to src/apple-other.rs diff --git a/src/lib.rs b/src/lib.rs index fb81400..3926258 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -15,7 +15,7 @@ //! | Linux, Android | `*‑linux‑*` | [`getrandom`][1] system call if available, otherwise [`/dev/urandom`][2] after successfully polling `/dev/random` //! | Windows | `*‑windows‑*` | [`BCryptGenRandom`] //! | macOS | `*‑apple‑darwin` | [`getentropy`][3] if available, otherwise [`/dev/urandom`][4] (identical to `/dev/random`) -//! | iOS | `*‑apple‑ios` | [`SecRandomCopyBytes`] +//! | iOS, tvOS, watchOS | `*‑apple‑ios`, `*-apple-tvos`, `*-apple-watchos` | [`SecRandomCopyBytes`] //! | FreeBSD | `*‑freebsd` | [`getrandom`][5] if available, otherwise [`kern.arandom`][6] //! | OpenBSD | `*‑openbsd` | [`getentropy`][7] //! | NetBSD | `*‑netbsd` | [`kern.arandom`][8] @@ -229,8 +229,8 @@ cfg_if! { #[path = "dragonfly.rs"] mod imp; } else if #[cfg(target_os = "fuchsia")] { #[path = "fuchsia.rs"] mod imp; - } else if #[cfg(target_os = "ios")] { - #[path = "ios.rs"] mod imp; + } else if #[cfg(any(target_os = "ios", target_os = "watchos", target_os = "tvos"))] { + #[path = "apple-other.rs"] mod imp; } else if #[cfg(target_os = "macos")] { mod util_libc; mod use_file;