aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Support/Process.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Support/Process.cpp b/lib/Support/Process.cpp
index c65cb45404..2cff1cebe5 100644
--- a/lib/Support/Process.cpp
+++ b/lib/Support/Process.cpp
@@ -13,6 +13,7 @@
#include "llvm/Support/Process.h"
#include "llvm/Config/config.h"
+#include <cstdlib>
namespace llvm {
using namespace sys;
@@ -27,7 +28,7 @@ unsigned llvm::sys::Process::GetRandomNumber() {
return arc4random();
#else
static int x = (::srand(::time(NULL)), 0);
- return rand();
+ return ::rand();
#endif
}