chg: [client] try to compile on openbsd

pull/23/head v0.3
Gerard Wagener 2019-04-05 15:59:02 +02:00
parent 60cfbcb250
commit e0d101dc3a
1 changed files with 4 additions and 0 deletions

View File

@ -100,11 +100,15 @@ int random_get_fd(void)
int my_getentropy(void *buf, size_t buflen)
{
#ifdef __GLIBC__
if (buflen > 256) {
errno = EIO;
return -1;
}
return syscall(SYS_getrandom, buf, buflen, 0);
#else
return getentropy(buf, buflen);
#endif
}
/*