ref: f135790674c19ee86976e5d7a112c3d937ee269b
parent: 9a7efce5f114ba90987f12b441225b340d554ea6
author: Jacob Moody <[email protected]>
date: Sat Feb 20 15:37:02 EST 2021
Use getentropy instead of genrandom (thanks Ori) Fixes compilation on OpenBSD
--- a/libc/genrandom.c
+++ b/libc/genrandom.c
@@ -3,10 +3,10 @@
#undef long
#undef ulong
-#include <sys/random.h>
+#include <unistd.h>
void
genrandom(uchar *buf, int nbytes)
{
- getrandom(buf, nbytes, 0);
+ getentropy(buf, nbytes);
}