diff options
-rw-r--r-- | meta/recipes-devtools/json-c/json-c/0001-json_tokener-requires-INF-and-NAN.patch | 37 | ||||
-rw-r--r-- | meta/recipes-devtools/json-c/json-c_0.12.bb | 6 |
2 files changed, 40 insertions, 3 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 @@ | |||
1 | From 9be71700eb580c815688584a64621a38867c3fdd Mon Sep 17 00:00:00 2001 | ||
2 | From: James Myatt <james.myatt@tessella.com> | ||
3 | Date: Thu, 5 Feb 2015 15:57:14 +0000 | ||
4 | Subject: [PATCH] json_tokener requires INF and NAN | ||
5 | |||
6 | --- | ||
7 | Upstream-Status: Backport | ||
8 | |||
9 | json_tokener.c | 3 ++- | ||
10 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
11 | |||
12 | Index: 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 == '-') | ||
diff --git a/meta/recipes-devtools/json-c/json-c_0.12.bb b/meta/recipes-devtools/json-c/json-c_0.12.bb index e9c5b31745..cfef03d2e8 100644 --- a/meta/recipes-devtools/json-c/json-c_0.12.bb +++ b/meta/recipes-devtools/json-c/json-c_0.12.bb | |||
@@ -4,7 +4,9 @@ HOMEPAGE = "https://github.com/json-c/json-c/wiki" | |||
4 | LICENSE = "MIT" | 4 | LICENSE = "MIT" |
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2" | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2" |
6 | 6 | ||
7 | SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz" | 7 | SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz \ |
8 | file://0001-json_tokener-requires-INF-and-NAN.patch \ | ||
9 | " | ||
8 | 10 | ||
9 | SRC_URI[md5sum] = "3ca4bbb881dfc4017e8021b5e0a8c491" | 11 | SRC_URI[md5sum] = "3ca4bbb881dfc4017e8021b5e0a8c491" |
10 | SRC_URI[sha256sum] = "000c01b2b3f82dcb4261751eb71f1b084404fb7d6a282f06074d3c17078b9f3f" | 12 | SRC_URI[sha256sum] = "000c01b2b3f82dcb4261751eb71f1b084404fb7d6a282f06074d3c17078b9f3f" |
@@ -17,5 +19,3 @@ do_configure_prepend() { | |||
17 | # Clean up autoconf cruft that should not be in the tarball | 19 | # Clean up autoconf cruft that should not be in the tarball |
18 | rm -f ${S}/config.status | 20 | rm -f ${S}/config.status |
19 | } | 21 | } |
20 | |||
21 | CFLAGS += "-Wno-error=unused-but-set-variable" | ||