Skip to content

Commit

Permalink
fix cross compilation failure due to size_t typecast in define
Browse files Browse the repository at this point in the history
The following commit introduces a cross-compilation failure:

   93c728b
  "Try to control ZEND_MM_ALIGNED_SIZE type"

br-arm-full/build/php-7.4.2/Zend/zend_alloc.h:30:38:
error: missing binary operator before token "8"
                                              ^
br-arm-full/build/php-7.4.2/ext/opcache/ZendAccelerator.c:1380:7:
note: in expansion of macro ‘ZEND_MM_ALIGNMENT’

Closes GH-5128.
  • Loading branch information
pmjdebruijn authored and nikic committed Jan 30, 2020
1 parent f70b552 commit f0f5c41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Zend/zend_alloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
#include "zend.h"

#ifndef ZEND_MM_ALIGNMENT
# define ZEND_MM_ALIGNMENT ((size_t) 8)
# define ZEND_MM_ALIGNMENT Z_UL(8)
# define ZEND_MM_ALIGNMENT_LOG2 Z_L(3)
#elif ZEND_MM_ALIGNMENT < 4
# undef ZEND_MM_ALIGNMENT
# undef ZEND_MM_ALIGNMENT_LOG2
# define ZEND_MM_ALIGNMENT ((size_t) 4)
# define ZEND_MM_ALIGNMENT Z_UL(4)
# define ZEND_MM_ALIGNMENT_LOG2 Z_L(2)
#endif

Expand Down

0 comments on commit f0f5c41

Please sign in to comment.