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

Unified Diff: runtime/bin/thread_android.cc

Issue 1450113003: Avoid strerror_r portability issues (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Don't compile for windows Created 5 years, 1 month 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
Index: runtime/bin/thread_android.cc
diff --git a/runtime/bin/thread_android.cc b/runtime/bin/thread_android.cc
index 62143ef8cd4a1a827c4f9966f9f01e3112385be5..e067e80dbbd48f49c3a4ac7b785665dbf2bc163c 100644
--- a/runtime/bin/thread_android.cc
+++ b/runtime/bin/thread_android.cc
@@ -11,6 +11,7 @@
#include <sys/time.h> // NOLINT
#include "platform/assert.h"
+#include "platform/utils.h"
namespace dart {
namespace bin {
@@ -19,7 +20,7 @@ namespace bin {
if (result != 0) { \
const int kBufferSize = 1024; \
char error_message[kBufferSize]; \
- strerror_r(result, error_message, kBufferSize); \
+ Utils::StrError(result, error_message, kBufferSize); \
FATAL2("pthread error: %d (%s)", result, error_message); \
}
@@ -29,7 +30,7 @@ namespace bin {
if (result != 0) { \
const int kBufferSize = 1024; \
char error_message[kBufferSize]; \
- strerror_r(result, error_message, kBufferSize); \
+ Utils::StrError(result, error_message, kBufferSize); \
fprintf(stderr, "%s:%d: pthread error: %d (%s)\n", \
__FILE__, __LINE__, result, error_message); \
return result; \

Powered by Google App Engine
This is Rietveld 408576698