Skip to content

Commit 983c94e

Browse files
committed
Fix phpGH-15742: php_hash_sha.h incompatible with C++
Not only MSVC doesn't support this construct, but apparently it is generally not supported by C++ compilers.
1 parent 5dd0575 commit 983c94e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/hash/php_hash_sha.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ typedef struct {
4545
PHP_HASH_API void PHP_SHA256InitArgs(PHP_SHA256_CTX *, ZEND_ATTRIBUTE_UNUSED HashTable *);
4646
PHP_HASH_API void PHP_SHA256Update(PHP_SHA256_CTX *, const unsigned char *, size_t);
4747

48-
#ifdef _MSC_VER
48+
#if defined(__cplusplus) || defined(_MSC_VER)
4949
# define PHP_STATIC_RESTRICT
5050
#else
5151
# define PHP_STATIC_RESTRICT static restrict

0 commit comments

Comments
 (0)