File tree 2 files changed +2
-7
lines changed
2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change 78
78
with :
79
79
targets : ${{ matrix.target }}
80
80
- name : Install multilib
81
- run : sudo apt-get install gcc-multilib
81
+ run : sudo apt-get update && sudo apt-get install gcc-multilib
82
82
- uses : Swatinem/rust-cache@v2
83
83
- run : cargo test --target=${{ matrix.target }} --features=std
84
84
Original file line number Diff line number Diff line change 2
2
use crate :: { util_libc:: last_os_error, Error } ;
3
3
use core:: mem:: MaybeUninit ;
4
4
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
-
10
5
pub fn getrandom_inner ( dest : & mut [ MaybeUninit < u8 > ] ) -> Result < ( ) , Error > {
11
6
// Emscripten 2.0.5 added getentropy, so we can use it unconditionally.
12
7
// 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 ( ) ) } ;
14
9
if ret < 0 {
15
10
return Err ( last_os_error ( ) ) ;
16
11
}
You can’t perform that action at this time.
0 commit comments