From b5b53224bebc170ba69aeb7e4369c37246bead65 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Mon, 13 Jan 2025 10:35:36 +0800 Subject: [PATCH] Fix micro SAPI for 8.4 on Windows --- php_micro.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/php_micro.c b/php_micro.c index f450964..21c7bf9 100644 --- a/php_micro.c +++ b/php_micro.c @@ -52,7 +52,9 @@ here's original copyright notice BOOL php_win32_init_random_bytes(void); BOOL php_win32_shutdown_random_bytes(void); BOOL php_win32_ioutil_init(void); +#if PHP_VERSION_ID < 80400 void php_win32_init_gettimeofday(void); +#endif #else # define php_select(m, r, w, e, t) select(m, r, w, e, t) # include @@ -588,7 +590,9 @@ int main(int argc, char *argv[]) php_win32_init_random_bytes(); // php_win32_signal_ctrl_handler_init(); php_win32_ioutil_init(); +#if PHP_VERSION_ID < 80400 php_win32_init_gettimeofday(); +#endif _fmode = _O_BINARY; /* sets default for file streams to binary */ setmode(_fileno(stdin), O_BINARY); /* make the stdio mode be binary */