1#ifdef __cplusplus 2extern "C" { 3#endif 4 5// This is used by libc++ as an efficient way to get high-quality random data 6// (more efficiently than via the filesystem using /dev/urandom). 7// Upstream musl added support for this, so we can switch to that, but it isn't 8// where libc++ looks for it (which is here and not unistd.h), and it uses a 9// syscall which is unnecessary indirection for us. 10int getentropy(void *buffer, size_t length); 11 12#include_next <sys/random.h> 13 14#ifdef __cplusplus 15} 16#endif 17 18