Fix undefined reference on Mac OS

This commit is contained in:
dsc 2020-09-20 23:16:36 +02:00
parent 55c3c547ed
commit 47303fb138
1 changed files with 2 additions and 0 deletions

View File

@ -66,9 +66,11 @@ void secure_random::gen_bytes(void* output, size_t size) {
while (size) {
ssize_t len = read(fd, outptr, size);
if (len < 0) {
#ifndef __APPLE__
if (errno != EINTR && errno != EAGAIN) {
break;
}
#endif
continue;
}
outptr += len;