mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 14:02:52 +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) {
|
||||
#ifndef NVMUTIL_ARC4RANDOM_BUF
|
||||
if (fd == urandom_fd) {
|
||||
/*
|
||||
* /dev/[u]random reads can still return
|
||||
@@ -986,7 +987,7 @@ read_gbe_file_exact(int fd, void *buf, size_t len,
|
||||
return rval;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
err(ECANCELED,
|
||||
"Short %s, %zd bytes, on file: %s",
|
||||
op ? op : "read", rval, path);
|
||||
|
||||
Reference in New Issue
Block a user