Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(421)

Unified Diff: runtime/bin/crypto_openbsd.cc

Issue 1559053002: Refs #10260 OpenBSD support #25327 Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address code review issues Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/builtin_impl_sources.gypi ('k') | runtime/bin/directory_openbsd.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/crypto_openbsd.cc
diff --git a/runtime/bin/crypto_android.cc b/runtime/bin/crypto_openbsd.cc
similarity index 89%
copy from runtime/bin/crypto_android.cc
copy to runtime/bin/crypto_openbsd.cc
index 4b55b910146141e8ad1a9277c76909f9d7eada9e..c53e78eeaa9dcb5cb34a272fbd6b131b4812bb61 100644
--- a/runtime/bin/crypto_android.cc
+++ b/runtime/bin/crypto_openbsd.cc
@@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
-#if defined(TARGET_OS_ANDROID)
+#if defined(TARGET_OS_OPENBSD)
#include <errno.h> // NOLINT
#include <fcntl.h> // NOLINT
@@ -17,6 +17,7 @@
namespace dart {
namespace bin {
+// TODO(mulander): Use arc4random_buf(void *buf, size_t nbytes)
bool Crypto::GetRandomBytes(intptr_t count, uint8_t* buffer) {
ThreadSignalBlocker signal_blocker(SIGPROF);
intptr_t fd = TEMP_FAILURE_RETRY_NO_SIGNAL_BLOCKER(
@@ -41,4 +42,4 @@ bool Crypto::GetRandomBytes(intptr_t count, uint8_t* buffer) {
} // namespace bin
} // namespace dart
-#endif // defined(TARGET_OS_ANDROID)
+#endif // defined(TARGET_OS_OPENBSD)
« no previous file with comments | « runtime/bin/builtin_impl_sources.gypi ('k') | runtime/bin/directory_openbsd.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698