From e69534cbd65d8739cdfb67b5b1a5161236c7361e Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 14 Apr 2025 18:30:15 -0400 Subject: Include stdlib --- lib/random/sysrandom.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/random/sysrandom.h') diff --git a/lib/random/sysrandom.h b/lib/random/sysrandom.h index ea29296b..d276be45 100644 --- a/lib/random/sysrandom.h +++ b/lib/random/sysrandom.h @@ -1,6 +1,7 @@ #pragma once #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__) +#include static ssize_t getrandom(void *buf, size_t buflen, unsigned int flags) { (void)flags; arc4random_buf(buf, buflen); @@ -8,7 +9,7 @@ static ssize_t getrandom(void *buf, size_t buflen, unsigned int flags) { } #elif defined(__linux__) // Use getrandom() -# include +#include #else #error "Unsupported platform for secure random number generation" #endif -- cgit v1.2.3