From 0170039520406d74b98ed1b20d4faeaf4f43ef58 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sat, 17 Nov 2012 10:16:20 +0100 Subject: php-pecl-memcached: rebuild for libmemcached 1.0.14 with SASL support --- memcached-build.patch | 34 +++++++++++----------------------- 1 file changed, 11 insertions(+), 23 deletions(-) (limited to 'memcached-build.patch') diff --git a/memcached-build.patch b/memcached-build.patch index 3b30972..1581e08 100644 --- a/memcached-build.patch +++ b/memcached-build.patch @@ -1,39 +1,27 @@ -From a66b1286b06ec0c8b11790d772725a2a7bb33d57 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Sat, 18 Aug 2012 18:57:39 +0200 -Subject: [PATCH] fix build with libmemcached < 1.0.10 +From 74542111f175fe2ec41c8bf722fc2cd3dac93eea Mon Sep 17 00:00:00 2001 +From: Andrei Zmievski +Date: Sun, 30 Sep 2012 11:09:01 -0700 +Subject: [PATCH] Fix version access for libmemcached older than 1.0.8. --- - config.m4 | 2 ++ - php_memcached.c | 6 ++++++ - 2 files changed, 8 insertions(+) + php_memcached.c | 7 +++++++ + 1 file changed, 7 insertions(+) -diff --git a/config.m4 b/config.m4 -index 045758a..a346d4c 100644 ---- a/config.m4 -+++ b/config.m4 -@@ -250,6 +250,8 @@ if test "$PHP_MEMCACHED" != "no"; then - - PHP_MEMCACHED_FILES="php_memcached.c fastlz/fastlz.c g_fmt.c" - -+ AC_CHECK_LIB(memcached, memcached_server_major_version, AC_DEFINE(HAVE_MEMCACHED_SERVER_VERSION, 1, [Whether libmemcached have memcached_server_xxx_version functions])) -+ - if test "$PHP_MEMCACHED_SESSION" != "no"; then - PHP_MEMCACHED_FILES="${PHP_MEMCACHED_FILES} php_memcached_session.c" - fi diff --git a/php_memcached.c b/php_memcached.c -index 90ea8ab..3f3882a 100644 +index 90ea8ab..7e6041a 100644 --- a/php_memcached.c +++ b/php_memcached.c -@@ -2643,9 +2643,15 @@ static memcached_return php_memc_do_version_callback(const memcached_st *ptr, me +@@ -2642,10 +2642,17 @@ static memcached_return php_memc_do_version_callback(const memcached_st *ptr, me + struct callbackContext* context = (struct callbackContext*) in_context; hostport_len = spprintf(&hostport, 0, "%s:%d", memcached_server_name(instance), memcached_server_port(instance)); ++#if defined(LIBMEMCACHED_VERSION_HEX) && LIBMEMCACHED_VERSION_HEX >= 0x01000008 version_len = snprintf(version, sizeof(version), "%d.%d.%d", -+#ifdef HAVE_MEMCACHED_SERVER_VERSION memcached_server_major_version(instance), memcached_server_minor_version(instance), memcached_server_micro_version(instance)); +#else ++ version_len = snprintf(version, sizeof(version), "%d.%d.%d", + instance->major_version, + instance->minor_version, + instance->micro_version); -- cgit