$OpenBSD: patch-ext_spl_php_spl_c,v 1.3 2016/05/06 19:59:05 sthen Exp $
--- ext/spl/php_spl.c.orig.port	Thu Apr 28 19:12:38 2016
+++ ext/spl/php_spl.c	Fri Apr 29 14:02:36 2016
@@ -744,19 +744,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);
