net_util: Change libc::getrandom to getrandom::getrandom

libc::getrandom need to be called inside unsafe and it is not
cross-platform friendly.
Change it to getrandom::getrandom that is safe and cross-platform
friendly.

Signed-off-by: Hui Zhu <teawater@antfin.com>
This commit is contained in:
Hui Zhu
2021-09-15 21:50:03 +08:00
committed by Sebastien Boeuf
parent c741c01cc0
commit c313bcbfd4
3 changed files with 8 additions and 15 deletions

View File

@@ -6,6 +6,7 @@ edition = "2018"
[dependencies]
epoll = "4.3.1"
getrandom = "0.2"
libc = "0.2.102"
log = "0.4.14"
net_gen = { path = "../net_gen" }