freebsd-ports/multimedia/php-pHash/files/patch-php__pHash.h
Jan Beich 493cf15e07 multimedia/php-pHash: unbreak build with lang/php70
In file included from bindings/php/pHash.cpp:17:
In file included from ./php_pHash.h:28:
In file included from /usr/local/include/php/main/php.h:35:
In file included from /usr/local/include/php/Zend/zend.h:36:
bindings/php/pHash.cpp:51:36: error:
      unknown type name 'zend_rsrc_list_entry'
extern "C" void ph_video_hash_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC)
                                   ^
bindings/php/pHash.cpp:260:18: error: use of
      undeclared identifier 'ZEND_REGISTER_RESOURCE'
        return_res_id = ZEND_REGISTER_RESOURCE(return_value, return_res, le_ph_video_hash);
                        ^
bindings/php/pHash.cpp:397:26: error:
      unexpected type name 'ulong64': expected expression
        ZEND_FETCH_RESOURCE(h1, ulong64 *, &h1_res, h1_resid, "ph_image_hash", le_ph_image_hash);
                                ^
[...]

PR:		213213
Submitted by:	Naram Qashat <cyberbotx@cyberbotx.com> (maintainer)
2016-11-05 19:25:47 +00:00

17 lines
351 B
C

--- php_pHash.h.orig 2013-04-23 18:53:42 UTC
+++ php_pHash.h
@@ -170,6 +170,14 @@ ZEND_END_ARG_INFO()
#define ph_compare_text_hashes_arg_info NULL
#endif
+#if PHP_VERSION_ID >= 70000
+#define SIZETorINT size_t
+#define zppLONG zend_long
+#else
+#define SIZETorINT int
+#define zppLONG long
+#endif
+
#ifdef __cplusplus
} // extern "C"
#endif