diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-14 18:57:40 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-14 18:57:40 +0000 |
| commit | 48d17cae0f5f3e298cb7b4f1d8b4ca694661734e (patch) | |
| tree | 5a29c01691f84e06bbfbd54f0a2ec6fe94d4aa19 /util/nvmutil | |
| parent | b26a292d3ef4c40e5176b1aad6e6db1fae031fb6 (diff) | |
util/nvmutil: enable arc4random on linux
not available on older systems. can just pass
the relevant flag in the compiler:
HAVE_ARC4RANDOM_BUF=0 at build time if you need
the fallback.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 9865f24b..ba3fc29f 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -15,8 +15,14 @@ * -Os -Wall -Wextra -Werror -pedantic -std=c90 */ +/* + * NOTE: older Linux lacked arc4random. + * added in glibc 2.36. Just pass HAVE_ARC4RANDOM_BUF=0 + * at build time if you need old Linux / other libc. + */ #if defined(__OpenBSD__) || defined(__FreeBSD__) || \ - defined(__NetBSD__) || defined(__APPLE__) + defined(__NetBSD__) || defined(__APPLE__) || \ + defined(__linux__) #ifndef HAVE_ARC4RANDOM_BUF #define HAVE_ARC4RANDOM_BUF 1 #endif |
