Browse Source

- Fix for bug #8535 - floating point exception on FreeBSD while initializing

crypt random numbers
PHP-4.0.5
Derick Rethans 26 years ago
parent
commit
aff9ff8356
  1. 2
      ext/standard/crypt.c

2
ext/standard/crypt.c

@ -106,7 +106,7 @@ PHP_MINIT_FUNCTION(crypt)
REGISTER_LONG_CONSTANT("CRYPT_BLOWFISH", PHP_BLOWFISH_CRYPT, CONST_CS | CONST_PERSISTENT);
#if HAVE_SRAND48
srand48((unsigned int) time(0) * getpid() * (php_combined_lcg() * 10000.0));
srand48((long) time(0) * (long) getpid() * (long) (php_combined_lcg() * 10000.0));
#elif HAVE_SRANDOM
srandom((unsigned int) time(0) * getpid() * (php_combined_lcg() * 10000.0));
#else

Loading…
Cancel
Save