skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

commit 28bfd386f2e8046c7b1cfb4b796ea1347e6a42b0
parent c9e549afa60dc3c4660e1de42a79f810299c2ade
Author: Laurent Bercot <ska-skaware@skarnet.org>
Date:   Sat, 26 Oct 2019 06:08:45 +0000

 Switch getrandom sysdep back to choose cl

Diffstat:
Mconfigure | 4++--
Mdoc/crosscompile.html | 5+----
Msrc/sysdeps/trygetrandom.c | 6++++++
3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/configure b/configure @@ -45,7 +45,7 @@ $package options: Sysdeps autodetection override: --with-sysdep-K=V assume sysdep K has the value V [autodetected] -List of mandatory K for cross-compiling: devurandom (V=yes|no), getrandom (V=yes|no) +List of mandatory K for cross-compiling: devurandom (V=yes|no) EOF exit 0 @@ -625,11 +625,11 @@ choose cl itimer 'setitimer()' choose cl namespaces 'namespaces' choose cl nsgetparent 'NS_GET_PARENT' choose cl explicit_bzero 'explicit_bzero()' +choose cl getrandom 'getrandom()' # And here are the evil irreducible sysdeps. choose clr devurandom '/dev/urandom' -choose clr getrandom 'getrandom()' rm -f "$tmps" echo "Creating config.mak..." diff --git a/doc/crosscompile.html b/doc/crosscompile.html @@ -83,16 +83,13 @@ the time <tt>yes</tt> or <tt>no</tt>. <p> At all times, <tt>./configure --help</tt> provides the list of sysdeps you need to provide a <tt>--with-sysdep-*</tt> option for. As of -skalibs-2.9.1.0, there are two sysdeps in this case: +skalibs-2.9.1.0, there is only one sysdep in this case: </p> <ul> <li> <tt>devurandom</tt>: <tt>yes</tt> if the target has a valid pseudorandom generation device in <tt>/dev/urandom</tt>, and <tt>no</tt> otherwise. </li> - <li> <tt>getrandom</tt>: <tt>yes</tt> if the target supports the -<a href="http://man7.org/linux/man-pages/man2/getrandom.2.html">getrandom()</a> -system call, and <tt>no</tt> otherwise. </li> </ul> </body> diff --git a/src/sysdeps/trygetrandom.c b/src/sysdeps/trygetrandom.c @@ -1,5 +1,11 @@ /* ISC license. */ +#include <features.h> + +#ifdef __stub_getrandom +#error getrandom() appears to be a stub function, we won't use it. +#endif + #include <sys/random.h> int main (void)