shithub: tlsclient

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