Skip to content

Commit ac0c9ad

Browse files
committed
Fix build
1 parent 1209330 commit ac0c9ad

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Zend/zend_alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2119,7 +2119,7 @@ static zend_result zend_mm_init_key(zend_mm_heap *heap)
21192119
#ifdef ZTS
21202120
THREAD_T tid = tsrm_thread_id();
21212121
uint64_t tmp = 0;
2122-
memcpy(&tmp, tid, MIN(sizeof(tmp), sizeof(tid)));
2122+
memcpy(&tmp, &tid, MIN(sizeof(tmp), sizeof(tid)));
21232123
v ^= tmp;
21242124
splitmix64(&v);
21252125
#endif

ext/random/csprng.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
#if HAVE_SYS_PARAM_H
4949
# include <sys/param.h>
5050
# if (__FreeBSD__ && __FreeBSD_version > 1200000) || (__DragonFly__ && __DragonFly_version >= 500700) || \
51-
defined(__sun) || (defined(__NetBSD__) && __NetBSD_Version__ >= 1000000000)
51+
defined(__sun) || (defined(__NetBSD__) && __NetBSD_Version__ >= 1000000000) || defined(__midipix__)
5252
# include <sys/random.h>
5353
# endif
5454
#endif
@@ -106,7 +106,7 @@ PHPAPI zend_result php_random_bytes_ex(void *bytes, size_t size, char *errstr, s
106106
#else
107107
size_t read_bytes = 0;
108108
# if (defined(__linux__) && defined(SYS_getrandom)) || (defined(__FreeBSD__) && __FreeBSD_version >= 1200000) || (defined(__DragonFly__) && __DragonFly_version >= 500700) || \
109-
defined(__sun) || (defined(__NetBSD__) && __NetBSD_Version__ >= 1000000000)
109+
defined(__sun) || (defined(__NetBSD__) && __NetBSD_Version__ >= 1000000000) || defined(__midipix__)
110110
/* Linux getrandom(2) syscall or FreeBSD/DragonFlyBSD/NetBSD getrandom(2) function
111111
* Being a syscall, implemented in the kernel, getrandom offers higher quality output
112112
* compared to the arc4random api albeit a fallback to /dev/urandom is considered.

0 commit comments

Comments
 (0)