diff --git a/ext/hash/php_hash_sha.h b/ext/hash/php_hash_sha.h index d5b04ddd2f479..748a2b2d63e32 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