From ccb7b1c48b26256a81a264baeb4ab9d06cf7221e Mon Sep 17 00:00:00 2001 From: Darafei Praliaskouski Date: Sat, 16 Dec 2017 10:40:06 +0000 Subject: [PATCH] Do not include private header for json-c >= 0.13 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Patch by Björn Esser Closes #3942 Closes https://github.com/postgis/postgis/pull/173 git-svn-id: http://svn.osgeo.org/postgis/trunk@16155 b70326c6-7e19-0410-871a-916f4a2858ee --- NEWS | 1 + liblwgeom/lwin_geojson.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/NEWS b/NEWS index 65a298a02..be8b4ce76 100644 --- a/NEWS +++ b/NEWS @@ -26,6 +26,7 @@ PostGIS 2.5.0 - #3234, Do not accept EMPTY points as topology nodes (Sandro Santilli) - #1014, Hashable geometry, allowing direct use in CTE signatures (Paul Ramsey) - #3097, Really allow MULTILINESTRING blades in ST_Split() (Paul Ramsey) + - #3942, geojson: Do not include private header for json-c >= 0.13 (Björn Esser) PostGIS 2.4.0 diff --git a/liblwgeom/lwin_geojson.c b/liblwgeom/lwin_geojson.c index 749d03374..ef907ee79 100644 --- a/liblwgeom/lwin_geojson.c +++ b/liblwgeom/lwin_geojson.c @@ -31,13 +31,19 @@ #if defined(HAVE_LIBJSON) || defined(HAVE_LIBJSON_C) /* --{ */ +#define JSON_C_VERSION_013 (13 << 8) + #ifdef HAVE_LIBJSON_C #include +#if !defined(JSON_C_VERSION_NUM) || JSON_C_VERSION_NUM < JSON_C_VERSION_013 #include +#endif #else #include +#if !defined(JSON_C_VERSION_NUM) || JSON_C_VERSION_NUM < JSON_C_VERSION_013 #include #endif +#endif #ifndef JSON_C_VERSION /* Adds support for libjson < 0.10 */ -- 2.40.0