From 646e3498932b1b6445d391e55e8a768bf3fe980c Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Mon, 9 Mar 2026 17:44:48 +0000 Subject: util/nvmutil: fix bsd build issue urandom_fd is unavailable on bsd Signed-off-by: Leah Rowe --- util/nvmutil/nvmutil.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 8f422eb7..f3e6dd76 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -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); -- cgit v1.2.1