I put the fix in seedrng.c
Let's avoid adding two source files just for this.
On Fri, Feb 24, 2023 at 11:52 PM Markus Mayer wrote:
>
> Glibc 2.24 and older do not provide an interface for the getrandom()
> system call. Linux kernels have been implementing this sytem call since
> kernel 3.17.
>
Hi,
This solution is equally correct, the most crucial thing here is that
`errno = ENOSYS;` is set so that the /dev/random fallback is used.
All other stuff is coding style, but I would personally already put
the include in "random.h". So that only one time the
glibc and kernel version check is
Glibc 2.24 and older do not provide an interface for the getrandom()
system call. Linux kernels have been implementing this sytem call since
kernel 3.17.
Let's address the situation where glibc <= 2.24 and Linux >= 3.17 by
providing the system call interface ourselves when needed. This allows