From 9c537de8a55023efde3498714ae3580bd8d68eb4 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sat, 10 Aug 2024 16:25:28 +0200 Subject: [PATCH] Fix some -Wimplicit-function-declaration errors on Windows (GH-15325) While clang is picky about these, MSVC doesn't seem to care and would only report the calls to undeclared functions as errors during link time. Still, obviously, MSVC is fine with having the declarations during compile time. --- ext/standard/proc_open.c | 3 +++ sapi/cli/php_cli_server.c | 1 + 2 files changed, 4 insertions(+) diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index f55fbfef568..2f7b85124f5 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -23,6 +23,9 @@ #include "SAPI.h" #include "main/php_network.h" #include "zend_smart_str.h" +#ifdef PHP_WIN32 +# include "win32/sockets.h" +#endif #ifdef HAVE_SYS_WAIT_H #include diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index a72acece0e0..bd030c20103 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -24,6 +24,7 @@ #ifdef PHP_WIN32 # include # include +# include "win32/console.h" # include "win32/time.h" # include "win32/signal.h" # include "win32/php_registry.h"