|
8 | 8 | //! | Windows | `*‑windows‑*` | [`BCryptGenRandom`] |
9 | 9 | //! | macOS | `*‑apple‑darwin` | [`getentropy`][3] |
10 | 10 | //! | iOS, tvOS, watchOS | `*‑apple‑ios`, `*-apple-tvos`, `*-apple-watchos` | [`CCRandomGenerateBytes`] |
11 | | -//! | FreeBSD | `*‑freebsd` | [`getrandom`][5] if available, otherwise [`kern.arandom`][6] |
| 11 | +//! | FreeBSD | `*‑freebsd` | [`getrandom`][5] |
12 | 12 | //! | OpenBSD | `*‑openbsd` | [`getentropy`][7] |
13 | 13 | //! | NetBSD | `*‑netbsd` | [`getrandom`][16] if available, otherwise [`kern.arandom`][8] |
14 | 14 | //! | Dragonfly BSD | `*‑dragonfly` | [`getrandom`][9] |
|
173 | 173 | //! [3]: https://www.unix.com/man-page/mojave/2/getentropy/ |
174 | 174 | //! [4]: https://www.unix.com/man-page/mojave/4/urandom/ |
175 | 175 | //! [5]: https://www.freebsd.org/cgi/man.cgi?query=getrandom&manpath=FreeBSD+12.0-stable |
176 | | -//! [6]: https://www.freebsd.org/cgi/man.cgi?query=random&sektion=4 |
177 | 176 | //! [7]: https://man.openbsd.org/getentropy.2 |
178 | 177 | //! [8]: https://man.netbsd.org/sysctl.7 |
179 | 178 | //! [9]: https://leaf.dragonflybsd.org/cgi/web-man?command=getrandom |
@@ -240,6 +239,7 @@ cfg_if! { |
240 | 239 | #[path = "use_file.rs"] mod imp; |
241 | 240 | } else if #[cfg(any( |
242 | 241 | target_os = "dragonfly", |
| 242 | + target_os = "freebsd", |
243 | 243 | target_os = "hurd", |
244 | 244 | // Check for target_arch = "arm" to only include the 3DS. Does not |
245 | 245 | // include the Nintendo Switch (which is target_arch = "aarch64"). |
@@ -298,9 +298,9 @@ cfg_if! { |
298 | 298 | mod util_libc; |
299 | 299 | mod use_file; |
300 | 300 | #[path = "solaris_illumos.rs"] mod imp; |
301 | | - } else if #[cfg(any(target_os = "freebsd", target_os = "netbsd"))] { |
| 301 | + } else if #[cfg(target_os = "netbsd")] { |
302 | 302 | mod util_libc; |
303 | | - #[path = "bsd_arandom.rs"] mod imp; |
| 303 | + #[path = "netbsd.rs"] mod imp; |
304 | 304 | } else if #[cfg(target_os = "fuchsia")] { |
305 | 305 | #[path = "fuchsia.rs"] mod imp; |
306 | 306 | } else if #[cfg(any(target_os = "ios", target_os = "visionos", target_os = "watchos", target_os = "tvos"))] { |
|
0 commit comments