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

Include relevant system headers before defining fallbacks

Otherwise we may define the fallbacks, and later inclusion of the
system headers may attempt to redefine those.

Fixes GH-17112.
Closes GH-17129.
This commit is contained in:
Christoph M. Becker
2024-12-12 17:20:00 +01:00
parent e0b79cdc5c
commit fcbfd5a680
2 changed files with 14 additions and 0 deletions

4
NEWS
View File

@@ -32,6 +32,7 @@ PHP NEWS
- FPM:
. Fixed bug GH-13437 (FPM: ERROR: scoreboard: failed to lock (already
locked)). (Jakub Zelenka)
. Fixed bug GH-17112 (Macro redefinitions). (cmb, nielsdos)
- GD:
. Fixed bug GH-16255 (Unexpected nan value in ext/gd/libgd/gd_filter.c).
@@ -44,6 +45,9 @@ PHP NEWS
- Iconv:
. Fixed bug GH-17047 (UAF on iconv filter failure). (nielsdos)
- MBString:
. Fixed bug GH-17112 (Macro redefinitions). (nielsdos, cmb)
- Opcache:
. opcache_get_configuration() properly reports jit_prof_threshold. (cmb)

View File

@@ -2,6 +2,16 @@
#include <php_config.h>
#ifdef HAVE_ARPA_INET_H
# include <arpa/inet.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
/* Solaris does not have it */
#ifndef INADDR_NONE
# define INADDR_NONE (-1)