From 3f0abc6ae42a54aadf8973482d030677dcd3979d Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Mon, 19 Oct 2026 10:14:02 +0200 Subject: [PATCH] fix(static): rename types.h to avoid header shadowing static-php-cli now passes the full `pkg-config --cflags` output, which adds `-I.../include/webp` to `CGO_CFLAGS`. `#include "types.h"` then resolves to libwebp's `types.h` and cgo fails with `could not determine what C.__hash_update_string__ refers to`. --- env.go | 2 +- types.h => frankenphp_types.h | 4 ++-- types.c | 2 +- types.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename types.h => frankenphp_types.h (94%) diff --git a/env.go b/env.go index 054736162e..aa61afb022 100644 --- a/env.go +++ b/env.go @@ -1,7 +1,7 @@ package frankenphp // #include "frankenphp.h" -// #include "types.h" +// #include "frankenphp_types.h" import "C" import ( "os" diff --git a/types.h b/frankenphp_types.h similarity index 94% rename from types.h rename to frankenphp_types.h index e4d3860376..53edc467c2 100644 --- a/types.h +++ b/frankenphp_types.h @@ -1,5 +1,5 @@ -#ifndef TYPES_H -#define TYPES_H +#ifndef _FRANKENPHP_TYPES_H +#define _FRANKENPHP_TYPES_H #include "frankenphp.h" #include diff --git a/types.c b/types.c index ed5f4fc846..4f0a32dfaa 100644 --- a/types.c +++ b/types.c @@ -1,4 +1,4 @@ -#include "types.h" +#include "frankenphp_types.h" zval *get_ht_packed_data(HashTable *ht, uint32_t index) { if (ht->u.flags & HASH_FLAG_PACKED) { diff --git a/types.go b/types.go index 8a8a37cda0..e293becbd0 100644 --- a/types.go +++ b/types.go @@ -17,7 +17,7 @@ package frankenphp #cgo noescape __zval_arr__ #cgo noescape __emalloc__ #cgo noescape __efree__ -#include "types.h" +#include "frankenphp_types.h" */ import "C" import (