[libvirt] [libvirt-php PATCH] Add missing zend_ulong64 definition for PHP7+

Neal Gompa ngompa13 at gmail.com
Thu Apr 14 18:06:00 UTC 2016


In PHP 7.0, the zend_ulong64 definition was removed in favor
of zend_ulong changing depending on whether PHP was compiled on
a 64-bit architecture or not. However, we need 64-bit wide unsigned
numbers, so the definition has been added for when it is compiled
against PHP 7.0 or newer.

The patch set that originally ported libvirt-php to PHP7+ did not
use zend_ulong64. However, it was altered to use it during the review,
which broke PHP 7.0 support. This fixes that.
---
 src/libvirt-php.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libvirt-php.c b/src/libvirt-php.c
index 7dcead8..91bb1c5 100644
--- a/src/libvirt-php.c
+++ b/src/libvirt-php.c
@@ -57,7 +57,7 @@ const char *features_binaries[] = { NULL };
 
 #if PHP_MAJOR_VERSION >= 7
 typedef size_t strsize_t;
-
+typedef uint64_t zend_ulong64;
 
 #define VIRT_FETCH_RESOURCE(_state, _type, _zval, _name, _le) \
 	if ((_state = (_type)zend_fetch_resource(Z_RES_P(*_zval), _name, _le)) == NULL) { \
-- 
2.5.5




More information about the libvir-list mailing list