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

Unified Diff: runtime/bin/process_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/bin/process_linux.cc ('k') | runtime/bin/thread_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/process_macos.cc
diff --git a/runtime/bin/process_macos.cc b/runtime/bin/process_macos.cc
index f6949582e229ea5012979376a11e8ee4339349c4..1ce34f99149e5b17fec74d18f278cfee655defd0 100644
--- a/runtime/bin/process_macos.cc
+++ b/runtime/bin/process_macos.cc
@@ -25,6 +25,7 @@
#include "bin/thread.h"
#include "platform/signal_blocker.h"
+#include "platform/utils.h"
@@ -660,7 +661,7 @@ class ProcessStarter {
void SetChildOsErrorMessage() {
const int kBufferSize = 1024;
char error_message[kBufferSize];
- strerror_r(errno, error_message, kBufferSize);
+ Utils::StrError(errno, error_message, kBufferSize);
*os_error_message_ = strdup(error_message);
}
@@ -671,7 +672,7 @@ class ProcessStarter {
int child_errno = errno;
const int kBufferSize = 1024;
char os_error_message[kBufferSize];
- strerror_r(errno, os_error_message, kBufferSize);
+ Utils::StrError(errno, os_error_message, kBufferSize);
int bytes_written =
FDUtils::WriteToBlocking(
exec_control_[1], &child_errno, sizeof(child_errno));
« no previous file with comments | « runtime/bin/process_linux.cc ('k') | runtime/bin/thread_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698