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

1
Cargo.lock generated
View File

@@ -600,6 +600,7 @@ name = "net_util"
version = "0.1.0"
dependencies = [
"epoll",
"getrandom",
"lazy_static",
"libc",
"log",