[PATCH v2] miscutils/seedrng.c: fix <sys/random.h> include error on glibc < 2.25

Thomas Devoogdt thomas at devoogdt.com
Fri Feb 17 19:39:19 UTC 2023


Hi,

Perhaps the whole function should be rewritten to simply fallback to that
syscall rather than directly fallback to /dev/random?

Or should I replace the define (-1) by that syscall?

Kr,

Thomas


Op vr 17 feb. 2023 20:32 schreef Steffen Nurpmeso <steffen at sdaoden.eu>:

> Ach, if he would have kept that "cat STUFF > /dev/u?random".
> Is there really a technical reason to require a special program.
> That is so un-UNIXish.
>
> There was a syscall even earlier, but, you know.
>
>   #include <sys/syscall.h>
>   int main(void){
>           char buf[256];
>           syscall(SYS_getrandom, buf, sizeof buf, 0);
>           return 0;
>   }
>
> --steffen
> |
> |Der Kragenbaer,                The moon bear,
> |der holt sich munter           he cheerfully and one by one
> |einen nach dem anderen runter  wa.ks himself off
> |(By Robert Gernhardt)
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20230217/37da9e46/attachment.html>


More information about the busybox mailing list