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

Unified Diff: runtime/bin/utils_linux.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/utils_android.cc ('k') | runtime/bin/utils_macos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/utils_linux.cc
diff --git a/runtime/bin/utils_linux.cc b/runtime/bin/utils_linux.cc
index f3d8654abc07085d6113eea603c7e04d41a44383..f84ba33b8485128128839df9e2094433f4cdd2cb 100644
--- a/runtime/bin/utils_linux.cc
+++ b/runtime/bin/utils_linux.cc
@@ -12,6 +12,7 @@
#include "bin/utils.h"
#include "platform/assert.h"
+#include "platform/utils.h"
namespace dart {
@@ -22,7 +23,7 @@ OSError::OSError() : sub_system_(kSystem), code_(0), message_(NULL) {
set_code(errno);
const int kBufferSize = 1024;
char error_buf[kBufferSize];
- SetMessage(strerror_r(errno, error_buf, kBufferSize));
+ SetMessage(Utils::StrError(errno, error_buf, kBufferSize));
}
@@ -32,7 +33,7 @@ void OSError::SetCodeAndMessage(SubSystem sub_system, int code) {
if (sub_system == kSystem) {
const int kBufferSize = 1024;
char error_buf[kBufferSize];
- SetMessage(strerror_r(code, error_buf, kBufferSize));
+ SetMessage(Utils::StrError(code, error_buf, kBufferSize));
} else if (sub_system == kGetAddressInfo) {
SetMessage(gai_strerror(code));
} else {
« no previous file with comments | « runtime/bin/utils_android.cc ('k') | runtime/bin/utils_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698