net/pecl-zmq: Fix build with PHP 7.3
Reviewed by: pkg-fallout Obtained from: Debian Sponsored by: Rubicon Communications, LLC (Netgate)
This commit is contained in:
parent
d2ccb71ee0
commit
c5977a7e35
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=481624
@ -2,7 +2,7 @@
|
||||
|
||||
PORTNAME= zmq
|
||||
PORTVERSION= 1.1.3
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= net pear
|
||||
|
||||
MAINTAINER= garga@FreeBSD.org
|
||||
|
26
net/pecl-zmq/files/patch-zmq.c
Normal file
26
net/pecl-zmq/files/patch-zmq.c
Normal file
@ -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);
|
||||
|
18
net/pecl-zmq/files/patch-zmq__helpers.c
Normal file
18
net/pecl-zmq/files/patch-zmq__helpers.c
Normal file
@ -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
|
||||
+/* }}} */
|
29
net/pecl-zmq/files/patch-zmq__pollset.c
Normal file
29
net/pecl-zmq/files/patch-zmq__pollset.c
Normal file
@ -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) {
|
Loading…
Reference in New Issue
Block a user