Fix undefined reference on Mac OS

dsc 4 years ago
parent 55c3c547ed
commit b81b39741f

@ -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;

Loading…
Cancel
Save