shithub: tlsclient

ref: 5667f2e915e89cfda69b3be28b612d59fea1d56b
dir: /libc/genrandom.c/

View raw version
#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);
}