Yet another attempt to fix Tiger.
[WebKit-https.git] / JavaScriptCore / wtf / RandomNumber.cpp
index ebbb24b..b40bb14 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "RandomNumberSeed.h"
 
+#include <limits>
 #include <limits.h>
 #include <stdint.h>
 #include <stdlib.h>
@@ -51,7 +52,7 @@ double randomNumber()
 
     return static_cast<double>(u) / (static_cast<double>(UINT_MAX) + 1.0);
 #elif PLATFORM(DARWIN)
-    return static_cast<double>(arc4random()) / (static_cast<double>(UINT32_MAX) + 1.0);
+    return static_cast<double>(arc4random()) / (static_cast<double>(std::numeric_limits<uint32_t>::max()) + 1.0);
 #else
     return static_cast<double>(rand()) / (static_cast<double>(RAND_MAX) + 1.0);
 #endif