diff options
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index b434853120e..987f24637d2 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -13,6 +13,7 @@ #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> +#include <time.h> // C++ Includes #include <algorithm> @@ -61,8 +62,10 @@ get_random_port () { if (!rand_initialized) { + time_t seed = time(NULL); + rand_initialized = true; - sranddev(); + srand(seed); } return (rand() % (UINT16_MAX - 1000u)) + 1000u; } |