Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Oct 2018 11:51:19 +0000 (UTC)
From:      Renato Botelho <garga@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r481624 - in head/net/pecl-zmq: . files
Message-ID:  <201810091151.w99BpJ7T032387@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: garga
Date: Tue Oct  9 11:51:18 2018
New Revision: 481624
URL: https://svnweb.freebsd.org/changeset/ports/481624

Log:
  net/pecl-zmq: Fix build with PHP 7.3
  
  Reviewed by:	pkg-fallout
  Obtained from:	Debian
  Sponsored by:	Rubicon Communications, LLC (Netgate)

Added:
  head/net/pecl-zmq/files/
  head/net/pecl-zmq/files/patch-zmq.c   (contents, props changed)
  head/net/pecl-zmq/files/patch-zmq__helpers.c   (contents, props changed)
  head/net/pecl-zmq/files/patch-zmq__pollset.c   (contents, props changed)
Modified:
  head/net/pecl-zmq/Makefile

Modified: head/net/pecl-zmq/Makefile
==============================================================================
--- head/net/pecl-zmq/Makefile	Tue Oct  9 11:04:06 2018	(r481623)
+++ head/net/pecl-zmq/Makefile	Tue Oct  9 11:51:18 2018	(r481624)
@@ -2,7 +2,7 @@
 
 PORTNAME=	zmq
 PORTVERSION=	1.1.3
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	net pear
 
 MAINTAINER=	garga@FreeBSD.org

Added: head/net/pecl-zmq/files/patch-zmq.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/pecl-zmq/files/patch-zmq.c	Tue Oct  9 11:51:18 2018	(r481624)
@@ -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);
+ 

Added: head/net/pecl-zmq/files/patch-zmq__helpers.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/pecl-zmq/files/patch-zmq__helpers.c	Tue Oct  9 11:51:18 2018	(r481624)
@@ -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
++/* }}} */

Added: head/net/pecl-zmq/files/patch-zmq__pollset.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/pecl-zmq/files/patch-zmq__pollset.c	Tue Oct  9 11:51:18 2018	(r481624)
@@ -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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810091151.w99BpJ7T032387>