$OpenBSD: patch-ext_spl_php_spl_c,v 1.1 2014/11/15 13:43:01 robert Exp $
--- ext/spl/php_spl.c.orig.port	Wed Sep 18 14:08:04 2013
+++ ext/spl/php_spl.c	Fri Sep 20 15:23:16 2013
@@ -784,7 +784,7 @@ PHP_FUNCTION(spl_object_hash)
 
 PHPAPI void php_spl_object_hash(zval *obj, char *result TSRMLS_DC) /* {{{*/
 {
-	intptr_t hash_handle, hash_handlers;
+	zend_intptr_t hash_handle, hash_handlers;
 	char *hex;
 
 	if (!SPL_G(hash_mask_init)) {
@@ -792,13 +792,13 @@ PHPAPI void php_spl_object_hash(zval *obj, char *resul
 			php_mt_srand(GENERATE_SEED() TSRMLS_CC);
 		}
 
-		SPL_G(hash_mask_handle)   = (intptr_t)(php_mt_rand(TSRMLS_C) >> 1);
-		SPL_G(hash_mask_handlers) = (intptr_t)(php_mt_rand(TSRMLS_C) >> 1);
+		SPL_G(hash_mask_handle)   = (zend_intptr_t)(php_mt_rand(TSRMLS_C) >> 1);
+		SPL_G(hash_mask_handlers) = (zend_intptr_t)(php_mt_rand(TSRMLS_C) >> 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);
 
 	spprintf(&hex, 32, "%016lx%016lx", hash_handle, hash_handlers);
 
