]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix redefinition of typedef Node in numeric.h
authorMichael Paquier <michael@paquier.xyz>
Thu, 2 Jul 2026 06:06:12 +0000 (15:06 +0900)
committerMichael Paquier <michael@paquier.xyz>
Thu, 2 Jul 2026 06:06:12 +0000 (15:06 +0900)
Commit 84001a04d552 has added a forward declaration of Node, something
not allowed in C99.

Per buildfarm members longfin and sifaka.

Discussion: https://postgr.es/m/akXt_WYx0dgdH6rf@paquier.xyz
Backpatch-through: 17-18

src/include/utils/numeric.h

index 264536d4e57b7ea04d1d3a1739424773bf7d5108..09bb9df551e423876181f139832789f9f42f2a05 100644 (file)
@@ -18,7 +18,7 @@
 #include "fmgr.h"
 
 /* forward declaration to avoid node.h include */
-typedef struct Node Node;
+struct Node;
 
 /*
  * Limits on the precision and scale specifiable in a NUMERIC typmod.  The
@@ -107,7 +107,7 @@ extern Numeric numeric_mod_opt_error(Numeric num1, Numeric num2,
 extern int32 numeric_int4_opt_error(Numeric num, bool *have_error);
 extern int64 numeric_int8_opt_error(Numeric num, bool *have_error);
 extern int32 make_numeric_typmod_safe(int32 precision, int32 scale,
-                                                                         Node *escontext);
+                                                                         struct Node *escontext);
 
 extern Numeric random_numeric(pg_prng_state *state,
                                                          Numeric rmin, Numeric rmax);