Skip to content

Commit f001307

Browse files
committed
Add tvOS and watchOS support, identical to iOS support
1 parent 2aabb63 commit f001307

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
File renamed without changes.

src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
//! | Linux, Android | `*‑linux‑*` | [`getrandom`][1] system call if available, otherwise [`/dev/urandom`][2] after successfully polling `/dev/random`
1616
//! | Windows | `*‑windows‑*` | [`BCryptGenRandom`]
1717
//! | macOS | `*‑apple‑darwin` | [`getentropy`][3] if available, otherwise [`/dev/urandom`][4] (identical to `/dev/random`)
18-
//! | iOS | `*‑apple‑ios` | [`SecRandomCopyBytes`]
18+
//! | iOS, tvOS, watchOS | `*‑apple‑ios`, `*-apple-tvos`, `*-apple-watchos` | [`SecRandomCopyBytes`]
1919
//! | FreeBSD | `*‑freebsd` | [`getrandom`][5] if available, otherwise [`kern.arandom`][6]
2020
//! | OpenBSD | `*‑openbsd` | [`getentropy`][7]
2121
//! | NetBSD | `*‑netbsd` | [`kern.arandom`][8]
@@ -229,8 +229,8 @@ cfg_if! {
229229
#[path = "dragonfly.rs"] mod imp;
230230
} else if #[cfg(target_os = "fuchsia")] {
231231
#[path = "fuchsia.rs"] mod imp;
232-
} else if #[cfg(target_os = "ios")] {
233-
#[path = "ios.rs"] mod imp;
232+
} else if #[cfg(any(target_os = "ios", target_os = "watchos" target_os = "tvos"))] {
233+
#[path = "apple-other.rs"] mod imp;
234234
} else if #[cfg(target_os = "macos")] {
235235
mod util_libc;
236236
mod use_file;

0 commit comments

Comments
 (0)