summaryrefslogtreecommitdiff
path: root/user/rust/0035-rand-5b9e5c39d857.patch
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2018-10-06 04:22:05 +0000
committerSamuel Holland <samuel@sholland.org>2018-10-09 04:28:15 +0000
commit2323b0da26e293bb4d5a7a4ad8afed85a599d11d (patch)
treed67f5276d8d72c2fe2caa2e4e5756c14848d9f91 /user/rust/0035-rand-5b9e5c39d857.patch
parent49cec2be42835f6b4c5ff1bad4710e20db422b87 (diff)
downloadpackages-2323b0da26e293bb4d5a7a4ad8afed85a599d11d.tar.gz
packages-2323b0da26e293bb4d5a7a4ad8afed85a599d11d.tar.bz2
packages-2323b0da26e293bb4d5a7a4ad8afed85a599d11d.tar.xz
packages-2323b0da26e293bb4d5a7a4ad8afed85a599d11d.zip
user/rust: Bump to 1.29.1 plus fixes for i586, ppc32
Diffstat (limited to 'user/rust/0035-rand-5b9e5c39d857.patch')
-rw-r--r--user/rust/0035-rand-5b9e5c39d857.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/user/rust/0035-rand-5b9e5c39d857.patch b/user/rust/0035-rand-5b9e5c39d857.patch
new file mode 100644
index 000000000..6f9d072f8
--- /dev/null
+++ b/user/rust/0035-rand-5b9e5c39d857.patch
@@ -0,0 +1,25 @@
+From 5b9e5c39d857312fb308493ac8d0b89f73607941 Mon Sep 17 00:00:00 2001
+From: Lion Yang <lion@aosc.io>
+Date: Wed, 15 Aug 2018 16:10:37 +0800
+Subject: [PATCH] os.rs: fix wrong syscall number for PowerPC
+
+__NR_getrandom is 359 on PowerPC, added from torvalds/linux@7d59deb50aa v3.17-rc5.
+The bug was introduced from 05f23d275 3 years ago, affecting from 0.1.1 to before 0.5.0-pre.0.
+It has already been fixed on the 0.5 branch at 00713a61c so this is a backport.
+---
+ src/os.rs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/vendor/rand-0.4.2/src/os.rs b/src/vendor/rand-0.4.2/src/os.rs
+index 633594ec7d..10022fbcd6 100644
+--- a/src/vendor/rand-0.4.2/src/os.rs
++++ b/src/vendor/rand-0.4.2/src/os.rs
+@@ -102,7 +102,7 @@ mod imp {
+ #[cfg(target_arch = "aarch64")]
+ const NR_GETRANDOM: libc::c_long = 278;
+ #[cfg(target_arch = "powerpc")]
+- const NR_GETRANDOM: libc::c_long = 384;
++ const NR_GETRANDOM: libc::c_long = 359;
+
+ unsafe {
+ syscall(NR_GETRANDOM, buf.as_mut_ptr(), buf.len(), 0)