From 2c40ad78166c4cdb667caf4238080a4708c43326 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Wed, 1 Apr 2026 11:36:41 +0100 Subject: lbutils: only use GNU SOURCE for syscall and remove manual prototypes; fchmod, realpath and so on rely on the _XOPEN_SOURCE macro. the POSIX macro wasn't needed: _XOPEN_SOURCE is sufficient. Signed-off-by: Leah Rowe --- util/libreboot-utils/lib/rand.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'util/libreboot-utils/lib/rand.c') diff --git a/util/libreboot-utils/lib/rand.c b/util/libreboot-utils/lib/rand.c index 8c3fbf4c..726d5cd2 100644 --- a/util/libreboot-utils/lib/rand.c +++ b/util/libreboot-utils/lib/rand.c @@ -7,19 +7,21 @@ #ifndef RAND_H #define RAND_H -#ifdef __OpenBSD__ -#include -#endif -#include - #if defined(USE_URANDOM) && \ ((USE_URANDOM) > 0) #include /* if not arc4random: /dev/urandom */ #elif defined(__linux__) -#include +#ifndef _GNU_SOURCE +#define _GNU_SOURCE 1 +#endif #include -long syscall(long number, ...); +#include +#endif + +#ifdef __OpenBSD__ +#include #endif +#include #include #include -- cgit v1.2.1