$OpenBSD: patch-ext_spl_php_spl_c,v 1.1.1.1 2015/12/14 17:58:45 robert Exp $
--- ext/spl/php_spl.c.orig.port	Sun Dec  6 14:08:26 2015
+++ ext/spl/php_spl.c	Sun Dec  6 14:09:05 2015
@@ -755,20 +755,20 @@ 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_handlers = SPL_G(hash_mask_handlers)^(intptr_t)Z_OBJ_HT_P(obj);
+	hash_handle   = SPL_G(hash_mask_handle)^(zend_intptr_t)Z_OBJ_HANDLE_P(obj);
+	hash_handlers = SPL_G(hash_mask_handlers)^(zend_intptr_t)Z_OBJ_HT_P(obj);
 
 	return strpprintf(32, "%016lx%016lx", hash_handle, hash_handlers);
 }
