Date: Sun, 14 Oct 2018 16:28:19 +0000 (UTC) From: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r482056 - in head/databases/php-memcache: . files Message-ID: <201810141628.w9EGSJCv006559@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sunpoet Date: Sun Oct 14 16:28:19 2018 New Revision: 482056 URL: https://svnweb.freebsd.org/changeset/ports/482056 Log: Fix build with PHP 7.3 Added: head/databases/php-memcache/files/ head/databases/php-memcache/files/patch-php7-memcache.c (contents, props changed) Modified: head/databases/php-memcache/Makefile Modified: head/databases/php-memcache/Makefile ============================================================================== --- head/databases/php-memcache/Makefile Sun Oct 14 16:28:10 2018 (r482055) +++ head/databases/php-memcache/Makefile Sun Oct 14 16:28:19 2018 (r482056) @@ -16,11 +16,12 @@ OPTIONS_DEFINE= EXAMPLES PORTSCOUT= skipv:start +USES= dos2unix php:ext +USE_PHP= session:build zlib:build + CONFIGURE_ARGS= --with-zlib-dir=/usr IGNORE_WITH_PHP=56 USE_CSTD= gnu89 -USE_PHP= session:build zlib:build -USES= dos2unix php:ext GH_ACCOUNT= websupport-sk GH_PROJECT= pecl-${PORTNAME} Added: head/databases/php-memcache/files/patch-php7-memcache.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/php-memcache/files/patch-php7-memcache.c Sun Oct 14 16:28:19 2018 (r482056) @@ -0,0 +1,38 @@ +--- php7/memcache.c.orig 2017-08-02 09:38:18 UTC ++++ php7/memcache.c +@@ -728,7 +728,11 @@ mmc_t *mmc_find_persistent(const char *h + mmc = mmc_server_new(host, host_len, port, udp_port, 1, timeout, retry_interval); + le->type = le_memcache_server; + le->ptr = mmc; ++#if PHP_VERSION_ID >= 70300 ++ GC_SET_REFCOUNT(le, 1); ++#else + GC_REFCOUNT(le) = 1; ++#endif + + /* register new persistent connection */ + if (zend_hash_str_update_mem(&EG(persistent_list), key, key_len, le, sizeof(*le)) == NULL) { +@@ -786,7 +790,11 @@ static mmc_t *php_mmc_pool_addserver( + pool->failure_callback = &php_mmc_failure_callback; + list_res = zend_register_resource(pool, le_memcache_pool); + add_property_resource(mmc_object, "connection", list_res); ++#if PHP_VERSION_ID >= 70300 ++ GC_ADDREF(list_res); ++#else + GC_REFCOUNT(list_res)++; ++#endif + } + else { + pool = zend_fetch_resource_ex(connection, "connection", le_memcache_pool); +@@ -870,7 +878,11 @@ static void php_mmc_connect(INTERNAL_FUN + mmc_object = return_value; + object_init_ex(mmc_object, memcache_ce); + add_property_resource(mmc_object, "connection", list_res); ++#if PHP_VERSION_ID >= 70300 ++ GC_ADDREF(list_res); ++#else + GC_REFCOUNT(list_res)++; ++#endif + } else { + RETVAL_TRUE; + }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810141628.w9EGSJCv006559>