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

Unified Diff: runtime/platform/utils_macos.h

Issue 1466523002: Landing patch set 7 from https://codereview.chromium.org/1450113003/ (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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/platform/utils_linux.h ('k') | runtime/vm/os_thread_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/platform/utils_macos.h
diff --git a/runtime/platform/utils_macos.h b/runtime/platform/utils_macos.h
index 3fa2984991dbbaa79f25bf36714dd43e60f9cc22..7c2a966db9d99f7ca3587224946e9ee0023c907e 100644
--- a/runtime/platform/utils_macos.h
+++ b/runtime/platform/utils_macos.h
@@ -60,6 +60,13 @@ inline uint64_t Utils::HostToLittleEndian64(uint64_t value) {
return OSSwapHostToLittleInt64(value);
}
+inline char* Utils::StrError(int err, char* buffer, size_t bufsize) {
+ if (strerror_r(err, buffer, bufsize) != 0) {
+ snprintf(buffer, bufsize, "%s", "strerror_r failed");
+ }
+ return buffer;
+}
+
} // namespace dart
#endif // PLATFORM_UTILS_MACOS_H_
« no previous file with comments | « runtime/platform/utils_linux.h ('k') | runtime/vm/os_thread_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698