aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2025-03-27 11:06:30 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2025-03-27 11:06:30 -0400
commitd66997dfe8fe5a2fc6e25a64e78309ca2094f396 (patch)
tree5fa22af9781893f1e8276d33886a418ffa551385 /src
parent0f3604a518f8b3fd35ffc344d85c71693ded0dde (diff)
downloadpostgresql-d66997dfe8fe5a2fc6e25a64e78309ca2094f396.tar.gz
postgresql-d66997dfe8fe5a2fc6e25a64e78309ca2094f396.zip
Avoid mixing designated and non-designated field initializers.
As revised by commit 9324c8c58, PG_MODULE_MAGIC constructed a struct initializer containing both designated fields and a non-designated "0". That's okay in C, but not in C++, with the result that extensions written in C++ failed to compile. Change it to use only designated field initializers. Author: Yurii Rashkovskii <yrashk@omnigres.com> Discussion: https://postgr.es/m/CAG=VW14mctsR543gpzLCuJ9JgJqwa=ptmBfGvxEjs+k8Jf7-Bg@mail.gmail.com
Diffstat (limited to 'src')
-rw-r--r--src/include/fmgr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/fmgr.h b/src/include/fmgr.h
index 853870d3abf..0fe7b4ebc77 100644
--- a/src/include/fmgr.h
+++ b/src/include/fmgr.h
@@ -522,7 +522,7 @@ extern PGDLLEXPORT const Pg_magic_struct *PG_MAGIC_FUNCTION_NAME(void); \
const Pg_magic_struct * \
PG_MAGIC_FUNCTION_NAME(void) \
{ \
- static const Pg_magic_struct Pg_magic_data = PG_MODULE_MAGIC_DATA(0); \
+ static const Pg_magic_struct Pg_magic_data = PG_MODULE_MAGIC_DATA(.name = NULL); \
return &Pg_magic_data; \
} \
extern int no_such_variable