diff --git a/src/secure_random.cpp b/src/secure_random.cpp index 4c8b750..d4930c1 100644 --- a/src/secure_random.cpp +++ b/src/secure_random.cpp @@ -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;