diff --git a/NEWS b/NEWS index b3db10da6c7..43fba066e9d 100644 --- a/NEWS +++ b/NEWS @@ -30,6 +30,9 @@ PHP NEWS - GD: . Added gdImageClone to bundled libgd. (David Carlier) +- Hash: + . Fixed bug GH-15742 (php_hash_sha.h incompatible with C++). (cmb) + - OpenSSL: . Implement GH-13514 PASSWORD_ARGON2 from OpenSSL 3.2. (Remi) diff --git a/ext/hash/php_hash_sha.h b/ext/hash/php_hash_sha.h index d5b04ddd2f4..748a2b2d63e 100644 --- a/ext/hash/php_hash_sha.h +++ b/ext/hash/php_hash_sha.h @@ -45,7 +45,7 @@ typedef struct { PHP_HASH_API void PHP_SHA256InitArgs(PHP_SHA256_CTX *, ZEND_ATTRIBUTE_UNUSED HashTable *); PHP_HASH_API void PHP_SHA256Update(PHP_SHA256_CTX *, const unsigned char *, size_t); -#ifdef _MSC_VER +#if defined(__cplusplus) || defined(_MSC_VER) # define PHP_STATIC_RESTRICT #else # define PHP_STATIC_RESTRICT static restrict