shithub: tlsclient

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