Skip to content

Commit f0f5c41

Browse files
pmjdebruijnnikic
authored andcommitted
fix cross compilation failure due to size_t typecast in define
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.
1 parent f70b552 commit f0f5c41

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Zend/zend_alloc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
#include "zend.h"
2828

2929
#ifndef ZEND_MM_ALIGNMENT
30-
# define ZEND_MM_ALIGNMENT ((size_t) 8)
30+
# define ZEND_MM_ALIGNMENT Z_UL(8)
3131
# define ZEND_MM_ALIGNMENT_LOG2 Z_L(3)
3232
#elif ZEND_MM_ALIGNMENT < 4
3333
# undef ZEND_MM_ALIGNMENT
3434
# undef ZEND_MM_ALIGNMENT_LOG2
35-
# define ZEND_MM_ALIGNMENT ((size_t) 4)
35+
# define ZEND_MM_ALIGNMENT Z_UL(4)
3636
# define ZEND_MM_ALIGNMENT_LOG2 Z_L(2)
3737
#endif
3838

0 commit comments

Comments
 (0)