Index: runtime/bin/crypto_linux.cc |
diff --git a/runtime/bin/crypto_linux.cc b/runtime/bin/crypto_linux.cc |
index 905bf77481a62744282c285f810c79d76f96eb43..643af6cf5014c70dedc4006f9489d2944227b45c 100644 |
--- a/runtime/bin/crypto_linux.cc |
+++ b/runtime/bin/crypto_linux.cc |
@@ -19,7 +19,7 @@ namespace bin { |
bool Crypto::GetRandomBytes(intptr_t count, uint8_t* buffer) { |
intptr_t fd = TEMP_FAILURE_RETRY(open("/dev/urandom", O_RDONLY)); |
if (fd < 0) return false; |
- intptr_t bytes_read = TEMP_FAILURE_RETRY(read(fd, buffer, count)); |
+ intptr_t bytes_read = FDUtils::ReadFromBlocking(fd, buffer, count); |
VOID_TEMP_FAILURE_RETRY(close(fd)); |
return bytes_read == count; |
} |