On Mon, Aug 13, 2018 at 01:12:12PM +0300, Janne Blomqvist wrote:
> PING
LGTM.
> > diff --git a/libgfortran/intrinsics/random.c b/libgfortran/intrinsics/
> > random.c
> > index 234c5ff95fd..229fa6995c0 100644
> > --- a/libgfortran/intrinsics/random.c
> > +++ b/libgfortran/intrinsics/random.c
> > @@ -310,11 +310,10 @@ getosrandom (void *buf, size_t buflen)
> > rand_s (&b[i]);
> > return buflen;
> > #else
> > - /*
> > - TODO: When glibc adds a wrapper for the getrandom() system call
> > - on Linux, one could use that.
> > -
> > - TODO: One could use getentropy() on OpenBSD. */
> > +#ifdef HAVE_GETENTROPY
> > + if (getentropy (buf, buflen) == 0)
> > + return 0;
> > +#endif
> > int flags = O_RDONLY;
> > #ifdef O_CLOEXEC
> > flags |= O_CLOEXEC;
> >
> >
> >
> > Just to be sure, I regtested this slightly modified patch as well. Ok for
> > trunk?
> >
> > --
> > Janne Blomqvist
> >
Jakub