Simple fixes for the gdb remote process plugin on Linux.

llvm-svn: 128291
This commit is contained in:
Stephen Wilson 2011-03-25 18:16:28 +00:00
parent 1080edbcdd
commit a78867b899
2 changed files with 4 additions and 1 deletions

View File

@ -11,6 +11,8 @@
#include "GDBRemoteCommunication.h" #include "GDBRemoteCommunication.h"
// C Includes // C Includes
#include <string.h>
// C++ Includes // C++ Includes
// Other libraries and framework includes // Other libraries and framework includes
#include "lldb/Core/Log.h" #include "lldb/Core/Log.h"

View File

@ -10,6 +10,7 @@
// C Includes // C Includes
#include <errno.h> #include <errno.h>
#include <spawn.h> #include <spawn.h>
#include <stdlib.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
@ -56,7 +57,7 @@ using namespace lldb_private;
static inline uint16_t static inline uint16_t
get_random_port () get_random_port ()
{ {
return (arc4random() % (UINT16_MAX - 1000u)) + 1000u; return (rand() % (UINT16_MAX - 1000u)) + 1000u;
} }