File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ matrix:
113113 - cargo build --target=x86_64-sun-solaris --all-features
114114 - cargo build --target=x86_64-unknown-cloudabi --all-features
115115 - cargo build --target=x86_64-unknown-freebsd --all-features
116- # - cargo build --target=x86_64-unknown -fuchsia --all-features
116+ - cargo build --target=x86_64-fuchsia --all-features
117117 - cargo build --target=x86_64-unknown-netbsd --all-features
118118 - cargo build --target=x86_64-unknown-redox --all-features
119119 - cargo build --target=x86_64-fortanix-unknown-sgx --all-features
@@ -123,7 +123,7 @@ matrix:
123123 - cargo build --target=x86_64-sun-solaris --all-features
124124 - cargo build --target=x86_64-unknown-cloudabi --all-features
125125 - cargo build --target=x86_64-unknown-freebsd --all-features
126- # - cargo build --target=x86_64-unknown -fuchsia --all-features
126+ - cargo build --target=x86_64-fuchsia --all-features
127127 - cargo build --target=x86_64-unknown-netbsd --all-features
128128 - cargo build --target=x86_64-unknown-redox --all-features
129129 - cargo build --target=x86_64-fortanix-unknown-sgx --all-features
Original file line number Diff line number Diff line change @@ -24,9 +24,6 @@ libc = "0.2.54"
2424[target .'cfg(unix)' .dependencies ]
2525lazy_static = " 1.3.0"
2626
27- [target .'cfg(fuchsia)' .dependencies ]
28- fuchsia-cprng = " 0.1"
29-
3027[target .'cfg(target_os = "redox")' .dependencies ]
3128lazy_static = " 1.3.0"
3229
Original file line number Diff line number Diff line change 1010use crate :: Error ;
1111use core:: num:: NonZeroU32 ;
1212
13+ #[ link( name = "zircon" ) ]
14+ extern "C" {
15+ fn zx_cprng_draw ( buffer : * mut u8 , length : usize ) ;
16+ }
17+
1318pub fn getrandom_inner ( dest : & mut [ u8 ] ) -> Result < ( ) , Error > {
14- fuchsia_cprng :: cprng_draw ( dest) ;
19+ unsafe { zx_cprng_draw ( dest. as_mut_ptr ( ) , dest . len ( ) ) }
1520 Ok ( ( ) )
1621}
1722
Original file line number Diff line number Diff line change 107107//! [8]: https://leaf.dragonflybsd.org/cgi/web-man?command=random§ion=4
108108//! [9]: https://docs.oracle.com/cd/E88353_01/html/E37841/getrandom-2.html
109109//! [10]: https://docs.oracle.com/cd/E86824_01/html/E54777/random-7d.html
110- //! [11]: https://fuchsia.googlesource.com/zircon /+/HEAD /docs/syscalls/cprng_draw.md
110+ //! [11]: https://fuchsia.googlesource.com/fuchsia /+/master/zircon /docs/syscalls/cprng_draw.md
111111//! [12]: https://github.com/redox-os/randd/blob/master/src/main.rs
112112//! [13]: https://github.com/nuxinl/cloudabi#random_get
113113//! [14]: https://www.w3.org/TR/WebCryptoAPI/#Crypto-method-getRandomValues
You can’t perform that action at this time.
0 commit comments