diff options
-rw-r--r-- | ext/standard/php_rand.h | 2 | ||||
-rw-r--r-- | ext/standard/rand.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/ext/standard/php_rand.h b/ext/standard/php_rand.h index 01db58d0e1..add0a651ea 100644 --- a/ext/standard/php_rand.h +++ b/ext/standard/php_rand.h @@ -24,6 +24,8 @@ #ifndef _PHP_RAND_H #define _PHP_RAND_H +#include <stdlib.h> + #ifndef RAND_MAX #define RAND_MAX (1<<15) #endif diff --git a/ext/standard/rand.c b/ext/standard/rand.c index 9ba1ca9c85..c3aa9917c6 100644 --- a/ext/standard/rand.c +++ b/ext/standard/rand.c @@ -92,7 +92,6 @@ #define loBits(u) ((u) & 0x7FFFFFFFU) /* mask the highest bit of u */ #define mixBits(u, v) (hiBit(u)|loBits(v)) /* move hi bit of u to hi bit of v */ -/* Could be 1<<32 but for some reason it has been used as 1<<31 in the past */ #define MT_RAND_MAX ((unsigned long)((1<<31)-1)) static void seedMT(php_uint32 seed BLS_DC) |