Closed
Description
Description
While trying to build sqlsrv 5.12.0 against PHP 8.4.0alpha2, I've noticed
php-src/ext/random/php_random.h
Lines 168 to 174 in ce8ffed
While designated initializers are a C99 feature, they are only supported as of C++20, and that appears to stretch compiler support a bit too far.
Even worse, apparently the type cast isn't supported by MSVC (and maybe others) at all.
Replacing that function definition with the following works smoothly:
static inline php_random_algo_with_state php_random_default_engine(void)
{
php_random_algo_with_state raws;
raws.algo = php_random_default_algo();
raws.state = php_random_default_status();
return raws;
}
Maybe there is a better solution.
PHP Version
PHP 8.4
Operating System
Windows