This commit is contained in:
henderkes
2026-03-08 00:57:32 +07:00
parent e2b611379c
commit 72633eff83
3 changed files with 9 additions and 8 deletions

View File

@@ -1,7 +1,4 @@
#ifndef HAVE_EMBED_CLI
#include "frankenphp.h"
#include <SAPI.h>
#include <SAPI.h>
#include <Zend/zend_alloc.h>
#include <Zend/zend_exceptions.h>
#include <Zend/zend_interfaces.h>
@@ -37,6 +34,8 @@
#include <pthread_np.h>
#endif
#if PHP_VERSION_ID >= 80600
typedef struct {
char *script;
int argc;
@@ -191,4 +190,4 @@ void *emulate_script_cli(void *arg) {
return exit_status;
}
#endif /* !HAVE_EMBED_CLI */
#endif /* PHP_VERSION_ID >= 80600 */

View File

@@ -1,3 +1,3 @@
#ifndef HAVE_EMBED_CLI
#if PHP_VERSION_ID < 80600
void *emulate_script_cli(void *arg);
#endif

View File

@@ -36,7 +36,9 @@
#include <pthread_np.h>
#endif
#ifndef HAVE_EMBED_CLI
#if PHP_VERSION_ID >= 80600
#include <sapi/cli/cli.h>
#else
#include "emulate_php_cli.h"
#endif
@@ -1254,7 +1256,7 @@ static void *execute_script_cli(void *arg) {
volatile int v = PHP_VERSION_ID;
(void)v;
#if HAVE_EMBED_CLI
#if PHP_VERSION_ID >= 80600
return (void *)(intptr_t)do_php_cli(args->argc, args->argv);
#else
return (void *)(intptr_t)emulate_script_cli(args);