From cb6a117af897773d2beae4122d4bf64bcc0b7b4f Mon Sep 17 00:00:00 2001 From: Sunpoet Po-Chuan Hsieh Date: Sun, 4 Dec 2016 10:44:08 +0000 Subject: [PATCH] - Fix build with PostgreSQL 9.5+ PR: 207314 Reported by: Vladyslav --- .../postgis20/files/patch-postgis-lwgeom_accum.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 databases/postgis20/files/patch-postgis-lwgeom_accum.c diff --git a/databases/postgis20/files/patch-postgis-lwgeom_accum.c b/databases/postgis20/files/patch-postgis-lwgeom_accum.c new file mode 100644 index 000000000000..4d49da94543f --- /dev/null +++ b/databases/postgis20/files/patch-postgis-lwgeom_accum.c @@ -0,0 +1,14 @@ +--- postgis/lwgeom_accum.c.orig 2012-02-27 22:08:12 UTC ++++ postgis/lwgeom_accum.c +@@ -106,7 +106,11 @@ pgis_geometry_accum_transfn(PG_FUNCTION_ + errmsg("could not determine input data type"))); + + if (fcinfo->context && IsA(fcinfo->context, AggState)) ++#if POSTGIS_PGSQL_VERSION >= 95 ++ aggcontext = ((AggState *) fcinfo->context)->aggcontexts; ++#else + aggcontext = ((AggState *) fcinfo->context)->aggcontext; ++#endif + #if POSTGIS_PGSQL_VERSION == 84 + + else if (fcinfo->context && IsA(fcinfo->context, WindowAggState))