From ee02e4be6a736728bc88ca2e1f9a75ea31c52649 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sat, 10 Aug 2024 15:27:32 +0200 Subject: [PATCH] Fix violation of the one definition rule in ext/com_dotnet (GH-15327) The definition of the class entries in the internal header file is not correct, since that file is included several times, and even the comment above the definition hints at com_extension.c where the actual definition is. We fix this by declaring these variables as `extern`. --- ext/com_dotnet/php_com_dotnet_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/com_dotnet/php_com_dotnet_internal.h b/ext/com_dotnet/php_com_dotnet_internal.h index 18982e56ccf..66b4f859377 100644 --- a/ext/com_dotnet/php_com_dotnet_internal.h +++ b/ext/com_dotnet/php_com_dotnet_internal.h @@ -66,7 +66,7 @@ static inline bool php_com_is_valid_object(zval *zv) } while(0) /* com_extension.c */ -zend_class_entry *php_com_variant_class_entry, *php_com_exception_class_entry, *php_com_saproxy_class_entry; +extern zend_class_entry *php_com_variant_class_entry, *php_com_exception_class_entry, *php_com_saproxy_class_entry; /* com_handlers.c */ zend_object* php_com_object_new(zend_class_entry *ce);