From fbb5430cd995284a15df0264289a3a5c033a0746 Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 16 Dec 2018 18:26:52 -0500 Subject: osapi: handle the getrandom(2) syscall in os-specific headers. --- profiles/osapi/linux.h | 1 + profiles/osapi/midipix.h | 9 +++++++++ profiles/osapi/modern.h | 1 - 3 files changed, 10 insertions(+), 1 deletion(-) (limited to 'profiles') diff --git a/profiles/osapi/linux.h b/profiles/osapi/linux.h index 38893ec..54d5142 100644 --- a/profiles/osapi/linux.h +++ b/profiles/osapi/linux.h @@ -6,6 +6,7 @@ /* interfaces */ #define HAVE_EPOLL 1 +#define HAVE_GETRANDOM_SYSCALL 1 #define HAVE_LINUX_CAN_RAW_FD_FRAMES 1 #define HAVE_SOCKADDR_ALG 1 diff --git a/profiles/osapi/midipix.h b/profiles/osapi/midipix.h index bf94a2b..300e361 100644 --- a/profiles/osapi/midipix.h +++ b/profiles/osapi/midipix.h @@ -6,6 +6,9 @@ #define HAVE_DIRENT_H 1 #define HAVE_NETPACKET_PACKET_H 1 +/* interfaces */ +#define HAVE_GETRANDOM_SYSCALL 1 + /* os characteristics */ #define RETSIGTYPE void #define SHLIB_EXT ".so" @@ -15,4 +18,10 @@ #define TANH_PRESERVES_ZERO_SIGN 1 #define TIME_WITH_SYS_TIME 1 +/* getrandom */ +#ifndef GRND_RANDOM +#define GRND_NONBLOCK (0x01) +#define GRND_RANDOM (0x02) +#endif + #endif diff --git a/profiles/osapi/modern.h b/profiles/osapi/modern.h index 56f1b5c..c18facf 100644 --- a/profiles/osapi/modern.h +++ b/profiles/osapi/modern.h @@ -135,7 +135,6 @@ #define HAVE_GETPID 1 #define HAVE_GETPRIORITY 1 #define HAVE_GETPWENT 1 -#define HAVE_GETRANDOM_SYSCALL 1 #define HAVE_GETRESGID 1 #define HAVE_GETRESUID 1 #define HAVE_GETSID 1 -- cgit v1.2.3