Index: runtime/platform/utils_android.h |
diff --git a/runtime/platform/utils_android.h b/runtime/platform/utils_android.h |
index 904f6f4613583ad2a6b89d220fc55ee8d6b65f3f..770944213edcad04fdf6100088a84cc26dade6cb 100644 |
--- a/runtime/platform/utils_android.h |
+++ b/runtime/platform/utils_android.h |
@@ -60,6 +60,13 @@ inline uint64_t Utils::HostToLittleEndian64(uint64_t value) { |
return htole64(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_ANDROID_H_ |