mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fix #64780 (PHP 5.5 builds are broken with GCC 3)
A recent change (by me) introduced a call to __builtin_offsetof() into zend_operators.h which is not defined by GCC prior to version 4. Changed the code to use offsetof() instead: this is defined in <stddef.h>, so #include this header conditionally (#ifdef GNUC)
This commit is contained in:
parent
de7415ea55
commit
5b121eb04d
1 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue