From a78867b8999bda4e277028e4d3417d805f0c4c2d Mon Sep 17 00:00:00 2001 From: Stephen Wilson Date: Fri, 25 Mar 2011 18:16:28 +0000 Subject: [PATCH] Simple fixes for the gdb remote process plugin on Linux. llvm-svn: 128291 --- .../Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | 2 ++ lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp index 15ab58975ccd..7a9694647f4e 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp @@ -11,6 +11,8 @@ #include "GDBRemoteCommunication.h" // C Includes +#include + // C++ Includes // Other libraries and framework includes #include "lldb/Core/Log.h" diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index e5a1d7c0606b..49f9aa6eb9f3 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -10,6 +10,7 @@ // C Includes #include #include +#include #include #include @@ -56,7 +57,7 @@ using namespace lldb_private; static inline uint16_t get_random_port () { - return (arc4random() % (UINT16_MAX - 1000u)) + 1000u; + return (rand() % (UINT16_MAX - 1000u)) + 1000u; }