kernel: fix build in hosted mode for rand

The `rand` module exists now, which conflicts with the `rand` crate.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2021-03-15 11:21:29 +08:00
parent 55a09990f0
commit 80c41f1dfc

View file

@ -64,7 +64,7 @@ pub fn set_send_addr(send_addr: Sender<SocketAddr>) {
#[cfg(not(test))]
fn generate_pid_key() -> [u8; 16] {
use rand::{thread_rng, Rng};
use ::rand::{thread_rng, Rng};
let mut process_key = [0u8; 16];
let mut rng = thread_rng();
for b in process_key.iter_mut() {