File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change 7878 with :
7979 targets : ${{ matrix.target }}
8080 - name : Install multilib
81+ run : sudo apt-get update
8182 run : sudo apt-get install gcc-multilib
8283 - uses : Swatinem/rust-cache@v2
8384 - run : cargo test --target=${{ matrix.target }} --features=std
Original file line number Diff line number Diff line change 22use crate :: { util_libc:: last_os_error, Error } ;
33use core:: mem:: MaybeUninit ;
44
5- // Not yet defined in libc crate.
6- extern "C" {
7- fn getentropy ( buffer : * mut libc:: c_void , length : usize ) -> libc:: c_int ;
8- }
9-
105pub fn getrandom_inner ( dest : & mut [ MaybeUninit < u8 > ] ) -> Result < ( ) , Error > {
116 // Emscripten 2.0.5 added getentropy, so we can use it unconditionally.
127 // Unlike other getentropy implementations, there is no max buffer length.
13- let ret = unsafe { getentropy ( dest. as_mut_ptr ( ) as * mut libc:: c_void , dest. len ( ) ) } ;
8+ let ret = unsafe { libc :: getentropy ( dest. as_mut_ptr ( ) as * mut libc:: c_void , dest. len ( ) ) } ;
149 if ret < 0 {
1510 return Err ( last_os_error ( ) ) ;
1611 }
You can’t perform that action at this time.
0 commit comments