$OpenBSD: patch-ext_spl_php_spl_c,v 1.4 2017/02/24 09:13:12 robert Exp $
--- ext/spl/php_spl.c.orig.port	Tue Feb 14 14:51:32 2017
+++ ext/spl/php_spl.c	Thu Feb 23 18:50:47 2017
@@ -768,19 +768,19 @@ PHP_FUNCTION(spl_object_hash)
 
 PHPAPI zend_string *php_spl_object_hash(zval *obj) /* {{{*/
 {
-	intptr_t hash_handle, hash_handlers;
+	zend_intptr_t hash_handle, hash_handlers;
 
 	if (!SPL_G(hash_mask_init)) {
 		if (!BG(mt_rand_is_seeded)) {
 			php_mt_srand((uint32_t)GENERATE_SEED());
 		}
 
-		SPL_G(hash_mask_handle)   = (intptr_t)(php_mt_rand() >> 1);
-		SPL_G(hash_mask_handlers) = (intptr_t)(php_mt_rand() >> 1);
+		SPL_G(hash_mask_handle)   = (zend_intptr_t)(php_mt_rand() >> 1);
+		SPL_G(hash_mask_handlers) = (zend_intptr_t)(php_mt_rand() >> 1);
 		SPL_G(hash_mask_init) = 1;
 	}
 
-	hash_handle   = SPL_G(hash_mask_handle)^(intptr_t)Z_OBJ_HANDLE_P(obj);
+	hash_handle   = SPL_G(hash_mask_handle)^(zend_intptr_t)Z_OBJ_HANDLE_P(obj);
 	hash_handlers = SPL_G(hash_mask_handlers);
 
 	return strpprintf(32, "%016lx%016lx", hash_handle, hash_handlers);
