From a43a89ffe2d2f46a407498c402c0603d35abb86d Mon Sep 17 00:00:00 2001 From: Jan Sommer Date: Wed, 16 Oct 2024 10:48:07 +0200 Subject: [PATCH] Add getentropy for RTEMS RTEMS provides the getentropy function. Use this for providing random data. --- library/std/src/sys/random/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/std/src/sys/random/mod.rs b/library/std/src/sys/random/mod.rs index d625814d15b39..8ec957c2e6972 100644 --- a/library/std/src/sys/random/mod.rs +++ b/library/std/src/sys/random/mod.rs @@ -22,7 +22,7 @@ cfg_if::cfg_if! { ))] { mod arc4random; pub use arc4random::fill_bytes; - } else if #[cfg(target_os = "emscripten")] { + } else if #[cfg(any(target_os = "emscripten", target_os = "rtems"))] { mod getentropy; pub use getentropy::fill_bytes; } else if #[cfg(target_os = "espidf")] {