just use /dev/urandom
All checks were successful
k4 Build Test / do_the_build (push) Successful in 46s

This commit is contained in:
mid 2026-01-22 21:18:29 +02:00
parent 57fffeb0a3
commit d614e2ced4

View File

@ -8,7 +8,6 @@
#else
#include<netdb.h>
#include<sys/socket.h>
#include<sys/random.h>
#include<arpa/inet.h>
#include<ifaddrs.h>
#endif
@ -36,6 +35,13 @@
#define RAND(b, i) RtlGenRandom(b, i)
#else
#define RAND(b, i) getrandom(b, i, 0)
static void getrandom(void *buf, size_t amount, int flags) {
static FILE *f;
if(!f) {
f = fopen("/dev/urandom", "rb");
}
fread(buf, 1, amount, f);
}
#endif
struct StunMsg {