I prepared a patch for this, and tested it on arm64. Fixes the build
problem as advertised.

Simple patch attached. I'm happy to NMU this if you like, 

Wookey
-- 
Principal hats:  Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/
diff -Nru psensor-0.8.0.4/debian/changelog psensor-0.8.0.4/debian/changelog
--- psensor-0.8.0.4/debian/changelog	2014-02-10 09:46:42.000000000 +0000
+++ psensor-0.8.0.4/debian/changelog	2014-05-30 16:42:58.000000000 +0000
@@ -1,3 +1,10 @@
+psensor (0.8.0.4-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Update to build against current json-c (Closes: #746145) 
+
+ -- Wookey <woo...@debian.org>  Fri, 30 May 2014 16:41:37 +0000
+
 psensor (0.8.0.4-1) unstable; urgency=low
 
   * New upstream release.
diff -Nru psensor-0.8.0.4/debian/patches/json-c-FTBFS-fix.patch psensor-0.8.0.4/debian/patches/json-c-FTBFS-fix.patch
--- psensor-0.8.0.4/debian/patches/json-c-FTBFS-fix.patch	1970-01-01 00:00:00.000000000 +0000
+++ psensor-0.8.0.4/debian/patches/json-c-FTBFS-fix.patch	2014-05-31 01:31:16.000000000 +0000
@@ -0,0 +1,26 @@
+Description: Update json usage for current API
+ The json-c interface was using a deprecated method.
+ This cherry-picked patch from upsream fixes it.
+ .
+ psensor (0.8.0.4-1.1) unstable; urgency=low
+ .
+Author: Wookey <woo...@debian.org>
+Bug-Debian: http://bugs.debian.org/746145
+Origin: upstream, http://wpitchoune.net/gitweb/?p=psensor.git;a=commitdiff;h=695aaee544240f86415140a77f5716f858bec91e
+Last-Update: 2014-05-31
+
+--- psensor-0.8.0.4.orig/src/lib/psensor_json.c
++++ psensor-0.8.0.4/src/lib/psensor_json.c
+@@ -140,9 +140,9 @@ struct psensor *psensor_new_from_json(js
+ 	struct psensor *s;
+ 	char *eid, *url;
+ 
+-	oid = json_object_object_get(o, "id");
+-	oname = json_object_object_get(o, "name");
+-	otype = json_object_object_get(o, "type");
++	json_object_object_get_ex(o, "id", &oid);
++	json_object_object_get_ex(o, "name", &oname);
++	json_object_object_get_ex(o, "type", &otype);
+ 
+ 	eid = url_encode(json_object_get_string(oid));
+ 	url = malloc(strlen(sensors_url) + 1 + strlen(eid) + 1);
diff -Nru psensor-0.8.0.4/debian/patches/series psensor-0.8.0.4/debian/patches/series
--- psensor-0.8.0.4/debian/patches/series	1970-01-01 00:00:00.000000000 +0000
+++ psensor-0.8.0.4/debian/patches/series	2014-05-31 01:28:25.000000000 +0000
@@ -0,0 +1 @@
+json-c-FTBFS-fix.patch

Reply via email to