aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-05-14 23:10:18 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-05-14 23:10:18 +0000
commitf1615f57420d537b2110e2b4da2ea74c4bc428f2 (patch)
treea157dff9380eb2f936c5392091674ca80b3672b6
parent63afca3915b7f3ec5c754ab1e5200a9efdcc1b34 (diff)
parent80c54714f6d161c7cd4d24b6df0aee1b176cbdcd (diff)
downloadoorandom-sdk-release.tar.gz
Snap for 11841552 from 80c54714f6d161c7cd4d24b6df0aee1b176cbdcd to sdk-releasesdk-release
Change-Id: I5a253d6a355afc94e3364267adf1eceadf28f274
-rw-r--r--Android.bp4
-rw-r--r--patches/std.diff14
-rw-r--r--src/lib.rs3
3 files changed, 20 insertions, 1 deletions
diff --git a/Android.bp b/Android.bp
index d1eb9d5..17b0085 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,5 +1,7 @@
// This file is generated by cargo_embargo.
-// Do not modify this file as changes will be overridden on upgrade.
+// Do not modify this file after the first "rust_*" or "genrule" module
+// because the changes will be overridden on upgrade.
+// Content before the first "rust_*" or "genrule" module is preserved.
package {
default_applicable_licenses: ["external_rust_crates_oorandom_license"],
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`.