diff --git a/net/pecl-zmq/Makefile b/net/pecl-zmq/Makefile index 81d895e44fc7..2ff25e641b2c 100644 --- a/net/pecl-zmq/Makefile +++ b/net/pecl-zmq/Makefile @@ -2,7 +2,7 @@ PORTNAME= zmq PORTVERSION= 1.1.3 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= net pear MAINTAINER= garga@FreeBSD.org diff --git a/net/pecl-zmq/files/patch-zmq.c b/net/pecl-zmq/files/patch-zmq.c new file mode 100644 index 000000000000..cd88f3993180 --- /dev/null +++ b/net/pecl-zmq/files/patch-zmq.c @@ -0,0 +1,26 @@ +--- zmq.c.orig 2016-02-01 01:50:43 UTC ++++ zmq.c +@@ -235,7 +235,11 @@ php_zmq_context *php_zmq_context_get(zend_long io_thre + le.type = php_zmq_context_list_entry(); + le.ptr = context; + ++#if PHP_VERSION_ID < 70300 + GC_REFCOUNT(&le) = 1; ++#else ++ GC_SET_REFCOUNT(&le, 1); ++#endif + + /* plist_key is not a persistent allocated key, thus we use str_update here */ + if (zend_hash_str_update_mem(&EG(persistent_list), plist_key->val, plist_key->len, &le, sizeof(le)) == NULL) { +@@ -535,7 +539,11 @@ void php_zmq_socket_store(php_zmq_socket *zmq_sock_p, + le.type = php_zmq_socket_list_entry(); + le.ptr = zmq_sock_p; + ++#if PHP_VERSION_ID < 70300 + GC_REFCOUNT(&le) = 1; ++#else ++ GC_SET_REFCOUNT(&le, 1); ++#endif + + plist_key = php_zmq_socket_plist_key(type, persistent_id, use_shared_ctx); + diff --git a/net/pecl-zmq/files/patch-zmq__helpers.c b/net/pecl-zmq/files/patch-zmq__helpers.c new file mode 100644 index 000000000000..1052311ba1f4 --- /dev/null +++ b/net/pecl-zmq/files/patch-zmq__helpers.c @@ -0,0 +1,18 @@ +--- zmq_helpers.c.orig 2016-02-01 01:50:43 UTC ++++ zmq_helpers.c +@@ -63,7 +63,7 @@ char *php_zmq_printable_func (zend_fcall_info *fci, ze + char *buffer = NULL; + + if (fci->object) { +- spprintf (&buffer, 0, "%s::%s", fci->object->ce->name->val, fci_cache->function_handler->common.function_name); ++ spprintf (&buffer, 0, "%s::%s", fci->object->ce->name->val, ZSTR_VAL(fci_cache->function_handler->common.function_name)); + } else { + if (Z_TYPE (fci->function_name) == IS_OBJECT) { + spprintf (&buffer, 0, "%s", Z_OBJCE (fci->function_name)->name->val); +@@ -74,4 +74,4 @@ char *php_zmq_printable_func (zend_fcall_info *fci, ze + } + return buffer; + } +-/* }}} */ +\ No newline at end of file ++/* }}} */ diff --git a/net/pecl-zmq/files/patch-zmq__pollset.c b/net/pecl-zmq/files/patch-zmq__pollset.c new file mode 100644 index 000000000000..f0134b9b9e72 --- /dev/null +++ b/net/pecl-zmq/files/patch-zmq__pollset.c @@ -0,0 +1,29 @@ +--- zmq_pollset.c.orig 2016-02-01 01:50:43 UTC ++++ zmq_pollset.c +@@ -169,7 +169,7 @@ static + zend_string *s_create_key(zval *entry) + { + if (Z_TYPE_P(entry) == IS_RESOURCE) { +- return strpprintf(0, "r:%ld", Z_RES_P(entry)->handle); ++ return strpprintf(0, "r:%d", Z_RES_P(entry)->handle); + } + else { + zend_string *hash = php_spl_object_hash(entry); +@@ -222,7 +222,7 @@ size_t php_zmq_pollset_num_items(php_zmq_pollset *set) + zend_string *php_zmq_pollset_add(php_zmq_pollset *set, zval *entry, int events, int *error) + { + zend_string *key; +- size_t num_items, index; ++ size_t index; + zmq_pollitem_t item; + + *error = 0; +@@ -233,7 +233,7 @@ zend_string *php_zmq_pollset_add(php_zmq_pollset *set, + return key; + } + +- num_items = php_zmq_pollset_num_items(set); ++ php_zmq_pollset_num_items(set); + memset(&item, 0, sizeof(zmq_pollitem_t)); + + if (Z_TYPE_P(entry) == IS_RESOURCE) {