From: Derick Rethans Date: Mon, 8 Jan 2001 21:13:24 +0000 (+0000) Subject: - Fix for bug #8535 - floating point exception on FreeBSD while initializing X-Git-Tag: php-4.0.5RC1~663 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aff9ff83562164a33289610260c081767ae971ae;p=php - Fix for bug #8535 - floating point exception on FreeBSD while initializing crypt random numbers --- diff --git a/ext/standard/crypt.c b/ext/standard/crypt.c index aa10020bee..d4cc55b43c 100644 --- a/ext/standard/crypt.c +++ b/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