DEVELOPERS: add Romain Naour for linux-syscall-support
[buildroot-gz.git] / package / tinycbor / 0001-Update-cjson-include-path.patch
blob5eea937d911b3814a1c52931be650ae9865e6c99
1 From 9aa79d8e9e38b31b34d9933a266c698e79808a79 Mon Sep 17 00:00:00 2001
2 From: Fabrice Fontaine <fabrice.fontaine@orange.com>
3 Date: Sun, 13 Nov 2016 15:43:40 +0100
4 Subject: [PATCH] Update cjson include path
6 Since cjson-v1.0.0 (https://github.com/DaveGamble/cJSON/releases),
7 cJSON.h is installed into cjson/cJSON.h and library has been renamed
8 from cJSON to cjson
10 Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
11 ---
12 Makefile | 4 ++--
13 Makefile.configure | 4 ++--
14 tools/json2cbor/json2cbor.c | 2 +-
15 3 files changed, 5 insertions(+), 5 deletions(-)
17 diff --git a/Makefile b/Makefile
18 index acd52eb..905fbdf 100644
19 --- a/Makefile
20 +++ b/Makefile
21 @@ -82,12 +82,12 @@ ifeq ($(open_memstream-pass),)
22 endif
23 endif
25 -# json2cbor depends on an external library (cJSON)
26 +# json2cbor depends on an external library (cjson)
27 ifneq ($(cjson-pass)$(system-cjson-pass),)
28 JSON2CBOR_SOURCES = tools/json2cbor/json2cbor.c
29 INSTALL_TARGETS += $(bindir)/json2cbor
30 ifeq ($(system-cjson-pass),1)
31 - LDFLAGS_CJSON = -lcJSON
32 + LDFLAGS_CJSON = -lcjson
33 else
34 JSON2CBOR_SOURCES += src/cjson/cJSON.c
35 json2cbor_CCFLAGS = -I$(SRCDIR)src/cjson
36 diff --git a/Makefile.configure b/Makefile.configure
37 index 28f4c92..424efb3 100644
38 --- a/Makefile.configure
39 +++ b/Makefile.configure
40 @@ -10,11 +10,11 @@ PROGRAM-gc_sections = int main() {}
41 CCFLAGS-gc_sections = -Wl,--gc-sections
43 PROGRAM-cjson = \#include <stdlib.h>\n
44 -PROGRAM-cjson += \#include <cJSON.h>\n
45 +PROGRAM-cjson += \#include <cjson/cJSON.h>\n
46 PROGRAM-cjson += int main() { return cJSON_False; }
47 CCFLAGS-cjson = -I$(dir $(MAKEFILE))src/cjson
48 PROGRAM-system-cjson = $(PROGRAM-cjson)
49 -CCFLAGS-system-cjson = -lcJSON
50 +CCFLAGS-system-cjson = -lcjson
52 sink:
53 @echo >&2 Please run from the top-level Makefile.
54 diff --git a/tools/json2cbor/json2cbor.c b/tools/json2cbor/json2cbor.c
55 index 96d3ed1..e194299 100644
56 --- a/tools/json2cbor/json2cbor.c
57 +++ b/tools/json2cbor/json2cbor.c
58 @@ -27,7 +27,7 @@
59 #include "cbor.h"
60 #include "compilersupport_p.h"
62 -#include <cJSON.h>
63 +#include <cjson/cJSON.h>
65 #include <errno.h>
66 #include <math.h>
67 --
68 2.5.0