Index: runtime/bin/eventhandler_linux.cc |
diff --git a/runtime/bin/eventhandler_linux.cc b/runtime/bin/eventhandler_linux.cc |
index cae740317c0460ec4e56e8e52a003883531c8ea0..111e7e65296c79af70fb5d3a84a5c19a4411bdf1 100644 |
--- a/runtime/bin/eventhandler_linux.cc |
+++ b/runtime/bin/eventhandler_linux.cc |
@@ -320,7 +320,10 @@ intptr_t EventHandlerImplementation::GetPollEvents(intptr_t events, |
event_mask = (1 << kCloseEvent); |
sd->MarkClosedRead(); |
} else if (errno != EWOULDBLOCK) { |
- Log::PrintErr("Error recv: %s\n", strerror(errno)); |
+ const int kBufferSize = 1024; |
+ char error_buf[kBufferSize]; |
+ Log::PrintErr("Error recv: %s\n", |
+ strerror_r(errno, error_buf, kBufferSize)); |
} |
} |
} |