aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2024-05-09 22:35:58 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2024-05-09 22:35:58 +0000
commit80c54714f6d161c7cd4d24b6df0aee1b176cbdcd (patch)
treea157dff9380eb2f936c5392091674ca80b3672b6
parentd85d25ed031676bd626277e73c68f041e04433aa (diff)
parent869bf4fb7f7fe78fa5da1619921648f4d41e2b96 (diff)
downloadoorandom-main.tar.gz
Merge "Ensure crate is compiled with std for panic handler" into mainHEADmastermain
-rw-r--r--patches/std.diff14
-rw-r--r--src/lib.rs3
2 files changed, 17 insertions, 0 deletions
diff --git a/patches/std.diff b/patches/std.diff
new file mode 100644
index 0000000..4524081
--- /dev/null
+++ b/patches/std.diff
@@ -0,0 +1,14 @@
+diff --git a/src/lib.rs b/src/lib.rs
+index 8196950..f77d0b1 100644
+--- a/src/lib.rs
++++ b/src/lib.rs
+@@ -22,6 +22,9 @@
+ #![no_std]
+ use core::ops::Range;
+
++#[cfg(android_dylib)]
++extern crate std;
++
+ /// A PRNG producing a 32-bit output.
+ ///
+ /// The current implementation is `PCG-XSH-RR`.
diff --git a/src/lib.rs b/src/lib.rs
index 8196950..f77d0b1 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -22,6 +22,9 @@
#![no_std]
use core::ops::Range;
+#[cfg(android_dylib)]
+extern crate std;
+
/// A PRNG producing a 32-bit output.
///
/// The current implementation is `PCG-XSH-RR`.