1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
  Avoid void* arithmetic in sockets/multicast.c on NetBSD
This commit is contained in:
Christoph M. Becker
2021-12-23 16:20:45 +01:00
3 changed files with 6 additions and 3 deletions

3
NEWS
View File

@@ -47,6 +47,9 @@ PHP NEWS
- PDO_PGSQL:
. Fixed error message allocation of PDO PgSQL. (SATO Kentaro)
- Sockets:
. Avoid void* arithmetic in sockets/multicast.c on NetBSD. (David Carlier)
- Spl:
. Fixed bug #75917 (SplFileObject::seek broken with CSV flags). (Aliaksandr
Bystry)

View File

@@ -75,7 +75,7 @@ static void __zend_cpuid(uint32_t func, uint32_t subfunc, zend_cpu_info *cpuinfo
#if defined(__i386__) || defined(__x86_64__)
/* Function based on compiler-rt implementation. */
static unsigned get_xcr0_eax() {
static unsigned get_xcr0_eax(void) {
# if defined(__GNUC__) || defined(__clang__)
// Check xgetbv; this uses a .byte sequence instead of the instruction
// directly because older assemblers do not include support for xgetbv and
@@ -90,7 +90,7 @@ static unsigned get_xcr0_eax() {
# endif
}
static bool is_avx_supported() {
static bool is_avx_supported(void) {
if (!(cpuinfo.ecx & ZEND_CPU_FEATURE_AVX)) {
/* No support for AVX */
return 0;

View File

@@ -784,7 +784,7 @@ int php_add4_to_if_index(struct in_addr *addr, php_socket *php_sock, unsigned *i
}
for (p = if_conf.ifc_buf;
p < if_conf.ifc_buf + if_conf.ifc_len;
p < ((char *)if_conf.ifc_buf) + if_conf.ifc_len;
p += entry_len) {
/* p may be misaligned on macos. */
struct ifreq cur_req;