mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-18 03:43:46 +02:00
util/nvmutil: fix bsd build issue
urandom_fd is unavailable on bsd Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -970,6 +970,7 @@ read_gbe_file_exact(int fd, void *buf, size_t len,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (rval != -1) {
|
if (rval != -1) {
|
||||||
|
#ifndef NVMUTIL_ARC4RANDOM_BUF
|
||||||
if (fd == urandom_fd) {
|
if (fd == urandom_fd) {
|
||||||
/*
|
/*
|
||||||
* /dev/[u]random reads can still return
|
* /dev/[u]random reads can still return
|
||||||
@@ -986,7 +987,7 @@ read_gbe_file_exact(int fd, void *buf, size_t len,
|
|||||||
return rval;
|
return rval;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
err(ECANCELED,
|
err(ECANCELED,
|
||||||
"Short %s, %zd bytes, on file: %s",
|
"Short %s, %zd bytes, on file: %s",
|
||||||
op ? op : "read", rval, path);
|
op ? op : "read", rval, path);
|
||||||
|
|||||||
Reference in New Issue
Block a user