summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/json-c/json-c
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2015-08-21 23:26:38 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-30 12:35:53 +0100
commit646a29c3dab7f18d03da8c966ce55d8a09483c0e (patch)
tree870c3153ab33698312eea912da7dc618f2fd2b2d /meta/recipes-devtools/json-c/json-c
parent00536009bdf5b4df2fefe64c2eee4db3bdef3150 (diff)
downloadpoky-646a29c3dab7f18d03da8c966ce55d8a09483c0e.tar.gz
json-c: Include math_compat.c for NAN/INF values
The backport patch also fixes the warning which was being work arounded by disabling unused-but-set-variable (From OE-Core rev: ebce241d0badff0a12b4c03a428720e0b4a59f32) (From OE-Core rev: 3f757eb71d69a763a33540b1a590db1926c25408) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/json-c/json-c')
-rw-r--r--meta/recipes-devtools/json-c/json-c/0001-json_tokener-requires-INF-and-NAN.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/meta/recipes-devtools/json-c/json-c/0001-json_tokener-requires-INF-and-NAN.patch b/meta/recipes-devtools/json-c/json-c/0001-json_tokener-requires-INF-and-NAN.patch
new file mode 100644
index 0000000000..d29d9118dc
--- /dev/null
+++ b/meta/recipes-devtools/json-c/json-c/0001-json_tokener-requires-INF-and-NAN.patch
@@ -0,0 +1,37 @@
1From 9be71700eb580c815688584a64621a38867c3fdd Mon Sep 17 00:00:00 2001
2From: James Myatt <james.myatt@tessella.com>
3Date: Thu, 5 Feb 2015 15:57:14 +0000
4Subject: [PATCH] json_tokener requires INF and NAN
5
6---
7Upstream-Status: Backport
8
9 json_tokener.c | 3 ++-
10 1 file changed, 2 insertions(+), 1 deletion(-)
11
12Index: json-c-0.12/json_tokener.c
13===================================================================
14--- json-c-0.12.orig/json_tokener.c
15+++ json-c-0.12/json_tokener.c
16@@ -16,6 +16,7 @@
17 #include "config.h"
18
19 #include <math.h>
20+#include "math_compat.h"
21 #include <stdio.h>
22 #include <stdlib.h>
23 #include <stddef.h>
24@@ -352,12 +353,10 @@ struct json_object* json_tokener_parse_e
25
26 case json_tokener_state_inf: /* aka starts with 'i' */
27 {
28- int size;
29- int size_inf;
30+ size_t size_inf;
31 int is_negative = 0;
32
33 printbuf_memappend_fast(tok->pb, &c, 1);
34- size = json_min(tok->st_pos+1, json_null_str_len);
35 size_inf = json_min(tok->st_pos+1, json_inf_str_len);
36 char *infbuf = tok->pb->buf;
37 if (*infbuf == '-')