Unbreak after json-c update.
This commit is contained in:
parent
e50cb8e196
commit
6ca04f3efe
12
geo/postgis/patches/patch-configure
Normal file
12
geo/postgis/patches/patch-configure
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-configure,v 1.1 2014/04/24 16:21:27 landry Exp $
|
||||
--- configure.orig Thu Apr 24 18:03:19 2014
|
||||
+++ configure Thu Apr 24 18:04:04 2014
|
||||
@@ -18376,7 +18376,7 @@ fi
|
||||
|
||||
CPPFLAGS_SAVE="$CPPFLAGS"
|
||||
CPPFLAGS="$JSON_CPPFLAGS"
|
||||
-ac_fn_c_check_header_mongrel "$LINENO" "json/json.h" "ac_cv_header_json_json_h" "$ac_includes_default"
|
||||
+ac_fn_c_check_header_mongrel "$LINENO" "json-c/json.h" "ac_cv_header_json_json_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_json_json_h" = x""yes; then :
|
||||
HAVE_JSON=yes
|
||||
fi
|
39
geo/postgis/patches/patch-liblwgeom_lwin_geojson_c
Normal file
39
geo/postgis/patches/patch-liblwgeom_lwin_geojson_c
Normal file
@ -0,0 +1,39 @@
|
||||
$OpenBSD: patch-liblwgeom_lwin_geojson_c,v 1.1 2014/04/24 16:21:27 landry Exp $
|
||||
|
||||
json_tokener.h had this at some point, then it got completely removed..
|
||||
|
||||
/**
|
||||
* @b XXX do not use json_tokener_errors directly.
|
||||
* After v0.10 this will be removed.
|
||||
*
|
||||
* See json_tokener_error_desc() instead.
|
||||
*/
|
||||
extern const char* json_tokener_errors[];
|
||||
|
||||
commit f9136f68520db4761f05810f97922900ba459f46
|
||||
Author: Eric Haszlakiewicz <erh+git@nimenees.com>
|
||||
Date: Sat Mar 22 21:41:24 2014 -0400
|
||||
|
||||
Make the json_tokener_errors array local. It has been deprecated for a while, and json_tokener_error_desc() should be used instead.
|
||||
--- liblwgeom/lwin_geojson.c.orig Thu Feb 28 18:42:49 2013
|
||||
+++ liblwgeom/lwin_geojson.c Thu Apr 24 18:10:55 2014
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
#ifdef HAVE_LIBJSON
|
||||
|
||||
-#include <json/json.h>
|
||||
-#include <json/json_object_private.h>
|
||||
+#include <json-c/json.h>
|
||||
+#include <json-c/json_object_private.h>
|
||||
#include <string.h>
|
||||
|
||||
static void geojson_lwerror(char *msg, int error_code)
|
||||
@@ -512,7 +512,7 @@ lwgeom_from_geojson(const char *geojson, char **srs)
|
||||
if( jstok->err != json_tokener_success)
|
||||
{
|
||||
char err[256];
|
||||
- snprintf(err, 256, "%s (at offset %d)", json_tokener_errors[jstok->err], jstok->char_offset);
|
||||
+ snprintf(err, 256, "%s (at offset %d)", json_tokener_error_desc(jstok->err), jstok->char_offset);
|
||||
json_tokener_free(jstok);
|
||||
json_object_put(poObj);
|
||||
geojson_lwerror(err, 1);
|
Loading…
x
Reference in New Issue
Block a user