[postgis-tickets] r16417 - Do not include private header for json-c >= 0.13

Sandro Santilli strk at kbt.io
Sun Feb 25 06:54:43 PST 2018


Author: strk
Date: 2018-02-25 06:54:42 -0800 (Sun, 25 Feb 2018)
New Revision: 16417

Modified:
   branches/2.4/NEWS
   branches/2.4/liblwgeom/lwin_geojson.c
Log:
Do not include private header for json-c >= 0.13

Patch by Björn Esser

Closes #3942 for 2.4 branch

(also fixes NEWS section corrupted by recent commit)

Modified: branches/2.4/NEWS
===================================================================
--- branches/2.4/NEWS	2018-02-24 16:21:38 UTC (rev 16416)
+++ branches/2.4/NEWS	2018-02-25 14:54:42 UTC (rev 16417)
@@ -7,15 +7,15 @@
   - #4003, lwpoly_construct_circle: Avoid division by zero (Raúl Marín Rodríguez)
   - #4020, Casting from box3d to geometry now returns correctly connected
            PolyhedralSurface (Matthias Bay)
+  - #3942, geojson: Do not include private header for json-c >= 0.13
+           (Björn Esser)
 
-PostGIS 2.3.6
-2018/01/17
-
  * Enhancements *
     - #3992, Use PKG_PROG_PKG_CONFIG macro from pkg.m4 to detect pkg-config
              (Bas Couwenberg)
     - #3946, Support for PgSQL 11 (Paul Ramsey)
 
+
 PostGIS 2.4.3
 2018/01/17
 

Modified: branches/2.4/liblwgeom/lwin_geojson.c
===================================================================
--- branches/2.4/liblwgeom/lwin_geojson.c	2018-02-24 16:21:38 UTC (rev 16416)
+++ branches/2.4/liblwgeom/lwin_geojson.c	2018-02-25 14:54:42 UTC (rev 16417)
@@ -31,13 +31,19 @@
 
 #if defined(HAVE_LIBJSON) || defined(HAVE_LIBJSON_C) /* --{ */
 
+#define JSON_C_VERSION_013 (13 << 8)
+
 #ifdef HAVE_LIBJSON_C
 #include <json-c/json.h>
+#if !defined(JSON_C_VERSION_NUM) || JSON_C_VERSION_NUM < JSON_C_VERSION_013
 #include <json-c/json_object_private.h>
+#endif
 #else
 #include <json/json.h>
+#if !defined(JSON_C_VERSION_NUM) || JSON_C_VERSION_NUM < JSON_C_VERSION_013
 #include <json/json_object_private.h>
 #endif
+#endif
 
 #ifndef JSON_C_VERSION
 /* Adds support for libjson < 0.10 */



More information about the postgis-tickets mailing list