php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #64780
Patch gcc3-offsetof revision 2013-05-07 09:06 UTC by ardbiesheuvel@php.net
Patch zend_operators.h.patch revision 2013-05-07 04:02 UTC by sixd@php.net

Patch gcc3-offsetof for Compile Failure Bug #64780

Patch version 2013-05-07 09:06 UTC

Return to Bug #64780 | Download this patch
Patch Revisions:

Developer: ardbiesheuvel@php.net

diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h
index a82c14b..0b890ff 100644
--- a/Zend/zend_operators.h
+++ b/Zend/zend_operators.h
@@ -26,6 +26,10 @@
 #include <math.h>
 #include <assert.h>
 
+#ifdef __GNUC__
+#include <stddef.h>
+#endif
+
 #ifdef HAVE_IEEEFP_H
 #include <ieeefp.h>
 #endif
@@ -497,7 +501,7 @@ ZEND_API void zend_update_current_locale(void);
 
 /* The offset in bytes between the value and type fields of a zval */
 #define ZVAL_OFFSETOF_TYPE	\
-	(__builtin_offsetof(zval,type) - __builtin_offsetof(zval,value))
+	(offsetof(zval,type) - offsetof(zval,value))
 
 static zend_always_inline int fast_increment_function(zval *op1)
 {
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 22:01:28 2024 UTC