ref: ea2f836f05bdf0f46159ed9c6f5547dec659199e
dir: /libc/genrandom.c/
#include <u.h> #include <libc.h> #undef long #undef ulong #include <unistd.h> #ifdef __APPLE__ #include <sys/random.h> #endif void genrandom(uchar *buf, int nbytes) { getentropy(buf, nbytes); }