Index: runtime/bin/file_macos.cc |
diff --git a/runtime/bin/file_macos.cc b/runtime/bin/file_macos.cc |
index ddc19cc029794e899f4c336332d2dcb251ebdcdd..6187e946a31e4c9161515f1454c6bf9346286d45 100644 |
--- a/runtime/bin/file_macos.cc |
+++ b/runtime/bin/file_macos.cc |
@@ -20,6 +20,7 @@ |
#include "bin/log.h" |
#include "platform/signal_blocker.h" |
+#include "platform/utils.h" |
namespace dart { |
namespace bin { |
@@ -57,7 +58,7 @@ void File::Close() { |
if (err != 0) { |
const int kBufferSize = 1024; |
char error_message[kBufferSize]; |
- strerror_r(errno, error_message, kBufferSize); |
+ Utils::StrError(errno, error_message, kBufferSize); |
Log::PrintErr("%s\n", error_message); |
} |
} |
@@ -394,7 +395,7 @@ File::StdioHandleType File::GetStdioHandleType(int fd) { |
if (result == -1) { |
const int kBufferSize = 1024; |
char error_message[kBufferSize]; |
- strerror_r(errno, error_message, kBufferSize); |
+ Utils::StrError(errno, error_message, kBufferSize); |
FATAL2("Failed stat on file descriptor %d: %s", fd, error_message); |
} |
if (S_ISCHR(buf.st_mode)) return kTerminal; |