Source: rt-app
Version: 0.3-2
Severity: serious
tags: patch

hello, attached a patch that makes it build with newer json-c

thanks

G.
diff -Nru rt-app-0.3/debian/changelog rt-app-0.3/debian/changelog
--- rt-app-0.3/debian/changelog 2017-03-09 14:44:33.000000000 +0100
+++ rt-app-0.3/debian/changelog 2020-07-31 10:09:43.000000000 +0200
@@ -1,3 +1,9 @@
+rt-app (0.3-2.1) unstable; urgency=medium
+
+  * Patch for newer json-c (Closes: #-1)
+
+ -- Gianfranco Costamagna <locutusofb...@debian.org>  Fri, 31 Jul 2020 
10:09:43 +0200
+
 rt-app (0.3-2) unstable; urgency=medium
 
   * Fix FTBFS on some arches by defining unsigned long long as __u64
diff -Nru rt-app-0.3/debian/patches/new-jsoncpp.patch 
rt-app-0.3/debian/patches/new-jsoncpp.patch
--- rt-app-0.3/debian/patches/new-jsoncpp.patch 1970-01-01 01:00:00.000000000 
+0100
+++ rt-app-0.3/debian/patches/new-jsoncpp.patch 2020-07-31 10:09:32.000000000 
+0200
@@ -0,0 +1,35 @@
+Description: Patch for newer json-c removed is_error
+Author: Gianfranco Costamagna <locutusofb...@debian.org>
+Last-Update: 2020-07-30
+
+Index: rt-app-0.3/src/rt-app_parse_config.c
+===================================================================
+--- rt-app-0.3.orig/src/rt-app_parse_config.c
++++ rt-app-0.3/src/rt-app_parse_config.c
+@@ -18,9 +18,16 @@
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, 
USA.
+ */
+-#include <json-c/bits.h>
+ #include "rt-app_parse_config.h"
+ 
++// not exported anymore by new json-c
++#ifndef TRUE
++#define TRUE 1
++#endif
++#ifndef FALSE
++#define FALSE 0
++#endif
++
+ #define PFX "[json] "
+ #define PFL "         "PFX
+ #define PIN PFX"    "
+@@ -886,7 +893,7 @@
+ {
+       struct json_object *global, *tasks, *resources;
+ 
+-      if (is_error(root)) {
++      if (root == NULL) {
+               log_error(PFX "Error while parsing input JSON");
+               exit(EXIT_INV_CONFIG);
+       }
diff -Nru rt-app-0.3/debian/patches/series rt-app-0.3/debian/patches/series
--- rt-app-0.3/debian/patches/series    2017-03-09 14:44:33.000000000 +0100
+++ rt-app-0.3/debian/patches/series    2020-07-31 10:09:39.000000000 +0200
@@ -1 +1,2 @@
 longlong-u64.diff
+new-jsoncpp.patch

Reply via email to