mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-21 00:27:09 +02:00
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 <leah@libreboot.org>
This commit is contained in:
@@ -7,19 +7,21 @@
|
||||
#ifndef RAND_H
|
||||
#define RAND_H
|
||||
|
||||
#ifdef __OpenBSD__
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
||||
#if defined(USE_URANDOM) && \
|
||||
((USE_URANDOM) > 0)
|
||||
#include <fcntl.h> /* if not arc4random: /dev/urandom */
|
||||
#elif defined(__linux__)
|
||||
#include <sys/random.h>
|
||||
#include <sys/syscall.h>
|
||||
long syscall(long number, ...);
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE 1
|
||||
#endif
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/random.h>
|
||||
#endif
|
||||
|
||||
#ifdef __OpenBSD__
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
Reference in New Issue
Block a user