ref: 3408b6170e377f55dfa01c41d5d4c02c3e6ae968
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); }