Index: runtime/platform/utils_fuchsia.h |
diff --git a/runtime/platform/utils_fuchsia.h b/runtime/platform/utils_fuchsia.h |
index 4e8c4e97796c2483592c5602935fb67f86cd0e12..575c3dbf5874b2cd9c0b96b716def20539e51682 100644 |
--- a/runtime/platform/utils_fuchsia.h |
+++ b/runtime/platform/utils_fuchsia.h |
@@ -62,7 +62,9 @@ inline uint64_t Utils::HostToLittleEndian64(uint64_t value) { |
inline char* Utils::StrError(int err, char* buffer, size_t bufsize) { |
- snprintf(buffer, bufsize, "errno = %d", err); |
+ if (strerror_r(err, buffer, bufsize) != 0) { |
+ snprintf(buffer, bufsize, "%s", "strerror_r failed"); |
+ } |
return buffer; |
} |