diff options
Diffstat (limited to 'memcached-pr3.patch')
-rw-r--r-- | memcached-pr3.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/memcached-pr3.patch b/memcached-pr3.patch new file mode 100644 index 0000000..5e0e194 --- /dev/null +++ b/memcached-pr3.patch @@ -0,0 +1,42 @@ +From 5c49c02dfd0b12f46ba2909aaec31938c6e96728 Mon Sep 17 00:00:00 2001 +From: Remi Collet <fedora@famillecollet.com> +Date: Wed, 2 Mar 2016 11:37:50 +0100 +Subject: [PATCH] Fix build with igbinary + +Using https://github.com/igbinary/igbinary7 +--- + php_memcached.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/php_memcached.c b/php_memcached.c +index 9195bfc..09df000 100644 +--- a/php_memcached.c ++++ b/php_memcached.c +@@ -3088,11 +3088,17 @@ zend_bool s_serialize_value (enum memcached_serializer serializer, zval *value, + */ + #ifdef HAVE_MEMCACHED_IGBINARY + case SERIALIZER_IGBINARY: +- if (igbinary_serialize((uint8_t **) &buf->c, &buf->len, value) != 0) { ++ { ++ char *s; ++ size_t l; ++ if (igbinary_serialize((uint8_t **) &s, &l, value) != 0) { + php_error_docref(NULL, E_WARNING, "could not serialize value with igbinary"); + return 0; + } ++ smart_str_setl(buf, s, l); ++ efree(s); + MEMC_VAL_SET_TYPE(*flags, MEMC_VAL_IS_IGBINARY); ++ } + break; + #endif + +@@ -3306,7 +3312,7 @@ zend_bool s_unserialize_value (enum memcached_serializer serializer, int val_typ + + case MEMC_VAL_IS_IGBINARY: + #ifdef HAVE_MEMCACHED_IGBINARY +- if (igbinary_unserialize((uint8_t *)payload, payload_len, &value)) { ++ if (igbinary_unserialize((const uint8_t *)payload, payload_len, value)) { + ZVAL_FALSE(value); + php_error_docref(NULL, E_WARNING, "could not unserialize value with igbinary"); + return 0; |