Skip to content

Commit 5321ee8

Browse files
committed
Fix build
1 parent 3e0de46 commit 5321ee8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Zend/zend_alloc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,7 +1330,7 @@ static zend_always_inline int zend_mm_small_size_to_bin(size_t size)
13301330

13311331
static zend_always_inline zend_mm_free_slot* zend_mm_encode_free_slot(const zend_mm_heap *heap, const zend_mm_free_slot *slot)
13321332
{
1333-
#if WORDS_BIGENDIAN
1333+
#ifdef WORDS_BIGENDIAN
13341334
return (zend_mm_free_slot*)(((uintptr_t)slot) ^ heap->shadow_key);
13351335
#else
13361336
return (zend_mm_free_slot*)(BSWAPPTR((uintptr_t)slot) ^ heap->shadow_key);
@@ -1339,7 +1339,7 @@ static zend_always_inline zend_mm_free_slot* zend_mm_encode_free_slot(const zend
13391339

13401340
static zend_always_inline zend_mm_free_slot* zend_mm_decode_free_slot(zend_mm_heap *heap, zend_mm_free_slot *slot)
13411341
{
1342-
#if WORDS_BIGENDIAN
1342+
#ifdef WORDS_BIGENDIAN
13431343
return (zend_mm_free_slot*)((uintptr_t)slot ^ heap->shadow_key));
13441344
#else
13451345
return (zend_mm_free_slot*)(BSWAPPTR((uintptr_t)slot ^ heap->shadow_key));

ext/random/random.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ PHPAPI zend_result php_general_random_bytes_for_zend(zend_utility_general_random
746746
size_t chunk_size = MIN(size, sizeof(result.size));
747747
memcpy(bytes, &result.result, chunk_size);
748748
size -= chunk_size;
749-
bytes += chunk_size;
749+
bytes = (char*)bytes + chunk_size;
750750
}
751751

752752
return SUCCESS;

0 commit comments

Comments
 (0)