| Index: runtime/bin/platform_macos.cc
|
| diff --git a/runtime/bin/platform_macos.cc b/runtime/bin/platform_macos.cc
|
| index aee6f89200291c56e4971b66b03f0c06372805c7..02745aa77b1cba756e11fe6686855e4586ebe24a 100644
|
| --- a/runtime/bin/platform_macos.cc
|
| +++ b/runtime/bin/platform_macos.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "bin/platform.h"
|
|
|
| +#include <string.h>
|
| #include <unistd.h>
|
|
|
|
|
| @@ -15,3 +16,12 @@ int Platform::NumberOfProcessors() {
|
| const char* Platform::OperatingSystem() {
|
| return "macos";
|
| }
|
| +
|
| +
|
| +char* Platform::StrError(int error_code) {
|
| + static const int kBufferSize = 1024;
|
| + char* error = static_cast<char*>(malloc(kBufferSize));
|
| + error[0] = '\0';
|
| + strerror_r(error_code, error, kBufferSize);
|
| + return error;
|
| +}
|
|
|