From fcbfd5a6800cc46158daa4a4ed5ae1c112002421 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 12 Dec 2024 17:20:00 +0100 Subject: [PATCH] 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. --- NEWS | 4 ++++ sapi/fpm/fpm/fpm_config.h | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/NEWS b/NEWS index 032bb9f3b06..376139b086f 100644 --- a/NEWS +++ b/NEWS @@ -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) diff --git a/sapi/fpm/fpm/fpm_config.h b/sapi/fpm/fpm/fpm_config.h index d34f686a6fb..a637326ed76 100644 --- a/sapi/fpm/fpm/fpm_config.h +++ b/sapi/fpm/fpm/fpm_config.h @@ -2,6 +2,16 @@ #include +#ifdef HAVE_ARPA_INET_H +# include +#endif +#ifdef HAVE_NETINET_IN_H +# include +#endif +#ifdef HAVE_SYS_TIME_H +# include +#endif + /* Solaris does not have it */ #ifndef INADDR_NONE # define INADDR_NONE (-1)