| Index: runtime/bin/file_android.cc
|
| diff --git a/runtime/bin/file_android.cc b/runtime/bin/file_android.cc
|
| index 9b5ff1b17d3ba2a7d66a3ab79e2bb4ada1901351..54ad86a73303543bb2f4bdc62cb5267c466fa9a9 100644
|
| --- a/runtime/bin/file_android.cc
|
| +++ b/runtime/bin/file_android.cc
|
| @@ -317,7 +317,10 @@ File::StdioHandleType File::GetStdioHandleType(int fd) {
|
| struct stat buf;
|
| int result = fstat(fd, &buf);
|
| if (result == -1) {
|
| - FATAL2("Failed stat on file descriptor %d: %s", fd, strerror(errno));
|
| + const int kBufferSize = 1024;
|
| + char error_message[kBufferSize];
|
| + strerror_r(errno, error_message, kBufferSize);
|
| + FATAL2("Failed stat on file descriptor %d: %s", fd, error_message);
|
| }
|
| if (S_ISCHR(buf.st_mode)) return kTerminal;
|
| if (S_ISFIFO(buf.st_mode)) return kPipe;
|
|
|