X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=src%2Fphp_http_etag.c;fp=src%2Fphp_http_etag.c;h=7e309f22636bdd4db813919da9bd669dc0e218e5;hp=eb3b5e35b11527f30a84b305c4308b17354c3b7b;hb=c13070d6868ec03633930c0744c319306790ca7d;hpb=a866d154e6409a1e5fb6b9192d89c94b63f1e222 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 */ -