summaryrefslogtreecommitdiffstats
path: root/memcached-build.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2024-10-04 18:00:06 +0200
committerRemi Collet <remi@php.net>2024-10-04 18:00:06 +0200
commit622e54e0b2b664b27534b4c94ad4edea5d28572c (patch)
treebbf8fc508812b7498d6d78c6f267aab887317b97 /memcached-build.patch
parent1d38a06a4793fed16af1757765843faa2132cd93 (diff)
update to 3.3.0RC1
enable zstd compression support
Diffstat (limited to 'memcached-build.patch')
-rw-r--r--memcached-build.patch41
1 files changed, 0 insertions, 41 deletions
diff --git a/memcached-build.patch b/memcached-build.patch
deleted file mode 100644
index 2ce2cba..0000000
--- a/memcached-build.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-Adapted for 3.7.0 from:
-
-From d226ee7d45538a853160d6e2264a56c121700775 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Tue, 30 Jan 2024 09:44:48 +0100
-Subject: [PATCH] Fix incompatible pointer types
-
----
- php_memcached.c | 10 +++++++---
- 1 file changed, 7 insertions(+), 3 deletions(-)
-
-diff --git a/php_memcached.c b/php_memcached.c
-index 00d5e3d4..c3ef16e8 100644
---- a/php_memcached.c
-+++ b/php_memcached.c
-@@ -899,10 +899,11 @@ zend_bool s_compress_value (php_memc_com
-
- case COMPRESSION_TYPE_ZLIB:
- {
-- compressed_size = buffer_size;
-- int status = compress((Bytef *) buffer, &compressed_size, (Bytef *) ZSTR_VAL(payload), ZSTR_LEN(payload));
-+ unsigned long cs = compressed_size = buffer_size;
-+ int status = compress((Bytef *) buffer, &cs, (Bytef *) ZSTR_VAL(payload), ZSTR_LEN(payload));
-
- if (status == Z_OK) {
-+ compressed_size = cs;
- compress_status = 1;
- compression_type_flag = MEMC_VAL_COMPRESSION_ZLIB;
- }
-@@ -3633,7 +3634,10 @@ zend_string *s_decompress_value (const c
- decompress_status = ((length = fastlz_decompress(payload, payload_len, &buffer->val, buffer->len)) > 0);
- }
- else if (is_zlib) {
-- decompress_status = (uncompress((Bytef *) buffer->val, &buffer->len, (Bytef *)payload, payload_len) == Z_OK);
-+ unsigned long ds = buffer->len;
-+
-+ decompress_status = (uncompress((Bytef *) buffer->val, &ds, (Bytef *)payload, payload_len) == Z_OK);
-+ buffer->len = ds;
- }
-
- ZSTR_VAL(buffer)[stored_length] = '\0';