rts2 icon indicating copy to clipboard operation
rts2 copied to clipboard

New PostgreSQL 16 changes break compilation

Open karpov-sv opened this issue 1 year ago • 0 comments

Just to keep track of things - recently (since PG16?..) they split some definitions from postgres.h into varatt.h. The following changes are necessary to compile RTS2:

diff --git a/src/pgsql/pg_wcs.c b/src/pgsql/pg_wcs.c
index 8570795fe..dc61fca75 100644
--- a/src/pgsql/pg_wcs.c
+++ b/src/pgsql/pg_wcs.c
@@ -21,6 +21,7 @@
 
 #include <postgres.h>
 #include <fmgr.h>
+#include <varatt.h>
 #ifdef PG_MODULE_MAGIC
 PG_MODULE_MAGIC;
 #endif
diff --git a/src/pgsql/pg_wcs2.c b/src/pgsql/pg_wcs2.c
index 62ef7d096..9b5d1f29a 100644
--- a/src/pgsql/pg_wcs2.c
+++ b/src/pgsql/pg_wcs2.c
@@ -21,6 +21,7 @@
 
 #include <postgres.h>
 #include <fmgr.h>
+#include <varatt.h>
 #ifdef PG_MODULE_MAGIC
 PG_MODULE_MAGIC;
 #endif

I don't know how to properly wrap the fix so that it still compiles on older versions (where this new header is absent), so will just leave it here for now.

karpov-sv avatar Oct 28 '23 14:10 karpov-sv