mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
build: Bump getrandom from 0.2.15 to 0.3.1
Manually bump `getrandom` due to API changes. Bumps [getrandom](https://github.com/rust-random/getrandom) from 0.2.15 to 0.3.1. - [Changelog](https://github.com/rust-random/getrandom/blob/master/CHANGELOG.md) - [Commits](rust-random/getrandom@v0.2.15...v0.3.1) Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
This commit is contained in:
@@ -6,7 +6,7 @@ version = "0.1.0"
|
||||
|
||||
[dependencies]
|
||||
epoll = "4.3.3"
|
||||
getrandom = "0.2.15"
|
||||
getrandom = "0.3.1"
|
||||
libc = "0.2.167"
|
||||
log = "0.4.22"
|
||||
net_gen = { path = "../net_gen" }
|
||||
|
||||
@@ -80,7 +80,7 @@ impl MacAddr {
|
||||
pub fn local_random() -> MacAddr {
|
||||
// Generate a fully random MAC
|
||||
let mut random_bytes = [0u8; MAC_ADDR_LEN];
|
||||
if let Err(e) = getrandom::getrandom(&mut random_bytes) {
|
||||
if let Err(e) = getrandom::fill(&mut random_bytes) {
|
||||
error!(
|
||||
"Error populating MAC address with random data: {}",
|
||||
e.to_string()
|
||||
|
||||
Reference in New Issue
Block a user