From 081a23da7c4427ed744367a83aea89d4efcdf97f Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Fri, 3 Feb 2012 21:03:46 +0000 Subject: [PATCH] Fix missing #ifdef POSTGIS_GEOS_VERSION ... #endif preventing liblwgeom from compiling on GEOS < 3.3.0. git-svn-id: http://svn.osgeo.org/postgis/trunk@9018 b70326c6-7e19-0410-871a-916f4a2858ee --- liblwgeom/lwgeom_geos_node.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/liblwgeom/lwgeom_geos_node.c b/liblwgeom/lwgeom_geos_node.c index 02ac299af..ab0fb5834 100644 --- a/liblwgeom/lwgeom_geos_node.c +++ b/liblwgeom/lwgeom_geos_node.c @@ -129,6 +129,13 @@ extern LWGEOM* lwgeom_node(const LWGEOM* lwgeom_in); LWGEOM* lwgeom_node(const LWGEOM* lwgeom_in) { +#if POSTGIS_GEOS_VERSION < 33 + lwerror("The GEOS version this postgis binary " + "was compiled against (%d) doesn't support " + "'GEOSUnaryUnion' function (3.3.0+ required)", + POSTGIS_GEOS_VERSION); + return NULL; +#else /* POSTGIS_GEOS_VERSION >= 33 */ GEOSGeometry *g1, *gu, *gm; LWGEOM *ep, *lines; LWCOLLECTION *col, *tc; @@ -248,5 +255,6 @@ lwgeom_node(const LWGEOM* lwgeom_in) lines->srid = lwgeom_in->srid; return (LWGEOM*)lines; +#endif /* POSTGIS_GEOS_VERSION >= 33 */ } -- 2.40.0