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

Unified Diff: runtime/vm/os_thread_macos.cc

Issue 1450113003: Avoid strerror_r portability issues (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: oops namespace 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
« no previous file with comments | « runtime/vm/os_thread_linux.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/os_thread_macos.cc
diff --git a/runtime/vm/os_thread_macos.cc b/runtime/vm/os_thread_macos.cc
index 851a4678ab6f783424eb877befcc7fcfae1384d5..fad1cc5a1a967f1aa0a4923e1111dc922e65d8cc 100644
--- a/runtime/vm/os_thread_macos.cc
+++ b/runtime/vm/os_thread_macos.cc
@@ -19,6 +19,7 @@
#include <mach/thread_act.h> // NOLINT
#include "platform/assert.h"
+#include "platform/utils.h"
namespace dart {
@@ -26,7 +27,7 @@ namespace dart {
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); \
}
@@ -44,7 +45,7 @@ namespace dart {
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; \
« no previous file with comments | « runtime/vm/os_thread_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698