From 622395b46b6861668a4b4db50502353fdee3f3c3 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sat, 10 Aug 2024 13:32:02 +0200 Subject: [PATCH] Fix violation of the one definition rule in ext/com_dotnet 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 18982e56ccfa0..66b4f859377a6 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);