From 3b694d7c0c9e97dd5144ec3fb958e8736616fc85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Thu, 8 Jan 2026 15:19:05 +0100 Subject: [PATCH 1/3] chore: remove useless cgo imports --- internal/phpheaders/phpheaders.go | 1 - internal/state/state.go | 1 - scaling.go | 3 --- worker.go | 2 -- 4 files changed, 7 deletions(-) diff --git a/internal/phpheaders/phpheaders.go b/internal/phpheaders/phpheaders.go index 71f23e7d92..19f1908d28 100644 --- a/internal/phpheaders/phpheaders.go +++ b/internal/phpheaders/phpheaders.go @@ -1,6 +1,5 @@ package phpheaders -import "C" import ( "context" "strings" diff --git a/internal/state/state.go b/internal/state/state.go index 7bdf9c064a..f5e15f7c3f 100644 --- a/internal/state/state.go +++ b/internal/state/state.go @@ -1,6 +1,5 @@ package state -import "C" import ( "slices" "sync" diff --git a/scaling.go b/scaling.go index 5ac07fe73b..3078851ac9 100644 --- a/scaling.go +++ b/scaling.go @@ -1,8 +1,5 @@ package frankenphp -//#include "frankenphp.h" -//#include -import "C" import ( "errors" "log/slog" diff --git a/worker.go b/worker.go index d87848bad2..ce74170b40 100644 --- a/worker.go +++ b/worker.go @@ -1,7 +1,5 @@ package frankenphp -// #include "frankenphp.h" -import "C" import ( "fmt" "os" From 39fac7f40db884485e61ba65cffe85f1771236ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Thu, 8 Jan 2026 15:50:28 +0100 Subject: [PATCH 2/3] remove unistd.h --- frankenphp.c | 1 - 1 file changed, 1 deletion(-) diff --git a/frankenphp.c b/frankenphp.c index 67ffdf28bd..4328a3e2a2 100644 --- a/frankenphp.c +++ b/frankenphp.c @@ -20,7 +20,6 @@ #include #include #include -#include #if defined(__linux__) #include #elif defined(__FreeBSD__) || defined(__OpenBSD__) From 032c373bd8b41af9e1e3587d4d60bbd2048aca66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Thu, 8 Jan 2026 16:12:39 +0100 Subject: [PATCH 3/3] remove PHPAPI macro as we don't export these functions --- frankenphp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frankenphp.c b/frankenphp.c index 4328a3e2a2..8121858a86 100644 --- a/frankenphp.c +++ b/frankenphp.c @@ -427,7 +427,7 @@ bool frankenphp_shutdown_dummy_request(void) { return true; } -PHPAPI void get_full_env(zval *track_vars_array) { +void get_full_env(zval *track_vars_array) { go_getfullenv(thread_index, track_vars_array); } @@ -1503,7 +1503,7 @@ static zend_module_entry **modules = NULL; static int modules_len = 0; static int (*original_php_register_internal_extensions_func)(void) = NULL; -PHPAPI int register_internal_extensions(void) { +int register_internal_extensions(void) { if (original_php_register_internal_extensions_func != NULL && original_php_register_internal_extensions_func() != SUCCESS) { return FAILURE;