summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
index dd161395601..47223f14575 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include <errno.h>
#include "GDBRemoteCommunicationServer.h"
#include "lldb/Core/StreamGDBRemote.h"
@@ -762,9 +763,9 @@ GDBRemoteCommunicationServer::Handle_qLaunchGDBServer (StringExtractorGDBRemote
Error error;
std::string hostname;
char unix_socket_name[PATH_MAX] = "/tmp/XXXXXX";
- if (::mktemp (unix_socket_name) == NULL)
+ if (::mkstemp (unix_socket_name) == -1)
{
- error.SetErrorString ("failed to make temporary path for a unix socket");
+ error.SetErrorStringWithFormat("failed to make temporary path for a unix socket with errno: %s", strerror(errno));
}
else
{
OpenPOWER on IntegriCloud