Skip to content

Commit da2e815

Browse files
committed
[watch os] add support for apple watchOS
1 parent dcf452b commit da2e815

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
//! | Windows | `*‑windows‑*` | [`BCryptGenRandom`][3] |
1717
//! | macOS | `*‑apple‑darwin` | [`getentropy()`][19] if available, otherwise [`/dev/random`][20] (identical to `/dev/urandom`)
1818
//! | iOS | `*‑apple‑ios` | [`SecRandomCopyBytes`][4]
19+
//! | watchOS | `*-apple-watchos` | [`SecRandomCopyBytes`][4]
1920
//! | FreeBSD | `*‑freebsd` | [`getrandom()`][21] if available, otherwise [`kern.arandom`][5]
2021
//! | OpenBSD | `*‑openbsd` | [`getentropy`][6]
2122
//! | NetBSD | `*‑netbsd` | [`kern.arandom`][7]
@@ -189,7 +190,7 @@ cfg_if! {
189190
#[path = "dragonfly.rs"] mod imp;
190191
} else if #[cfg(target_os = "fuchsia")] {
191192
#[path = "fuchsia.rs"] mod imp;
192-
} else if #[cfg(target_os = "ios")] {
193+
} else if #[cfg(any(target_os = "ios", target_os = "watchos"))] {
193194
#[path = "ios.rs"] mod imp;
194195
} else if #[cfg(target_os = "macos")] {
195196
mod util_libc;

0 commit comments

Comments
 (0)