From: Michael Wallner Date: Tue, 12 Jan 2021 19:15:46 +0000 (+0100) Subject: fix usage of hash_init() in 8.1 X-Git-Tag: v4.0.0~7 X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=commitdiff_plain;h=c13070d6868ec03633930c0744c319306790ca7d fix usage of hash_init() in 8.1 --- diff --git a/src/php_http_etag.c b/src/php_http_etag.c index eb3b5e3..7e309f2 100644 --- a/src/php_http_etag.c +++ b/src/php_http_etag.c @@ -17,6 +17,12 @@ #include "ext/standard/sha1.h" #include "ext/standard/md5.h" +#if PHP_VERSION_ID >= 80100 +# define HASH_INIT_ARGS ,NULL +#else +# define HASH_INIT_ARGS +#endif + php_http_etag_t *php_http_etag_init(const char *mode) { php_http_etag_t *e; @@ -31,7 +37,7 @@ php_http_etag_t *php_http_etag_init(const char *mode) e = emalloc(sizeof(*e) + eho->context_size - 1); e->ops = eho; - eho->hash_init(e->ctx); + eho->hash_init(e->ctx HASH_INIT_ARGS); return e; } @@ -64,4 +70,3 @@ size_t php_http_etag_update(php_http_etag_t *e, const char *data_ptr, size_t dat * vim600: noet sw=4 ts=4 fdm=marker * vim<600: noet sw=4 ts=4 */ -