summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/json-c
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-08-14 15:20:28 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-16 14:57:58 +0100
commitddb63d9e02b17877d5e56f8ab73befa1632861f7 (patch)
tree4d24752fc6f1cef30e3cc9e3d6bed5cc12ae0ff7 /meta/recipes-devtools/json-c
parent70700eab9cca9daaccf4effbc4ff52cae55c619c (diff)
downloadpoky-ddb63d9e02b17877d5e56f8ab73befa1632861f7.tar.gz
json-c: Fix function prototypes
This is flagged with clang 15 (From OE-Core rev: 4af59d145103778debec000100c10846fa64afa4) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/json-c')
-rw-r--r--meta/recipes-devtools/json-c/json-c/0001-Fix-build-with-clang-15.patch34
-rw-r--r--meta/recipes-devtools/json-c/json-c_0.16.bb2
2 files changed, 35 insertions, 1 deletions
diff --git a/meta/recipes-devtools/json-c/json-c/0001-Fix-build-with-clang-15.patch b/meta/recipes-devtools/json-c/json-c/0001-Fix-build-with-clang-15.patch
new file mode 100644
index 0000000000..215f4d829a
--- /dev/null
+++ b/meta/recipes-devtools/json-c/json-c/0001-Fix-build-with-clang-15.patch
@@ -0,0 +1,34 @@
1From 0145b575ac1fe6a77e00d639864f26fc91ceb12f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 13 Aug 2022 20:37:03 -0700
4Subject: [PATCH] Fix build with clang-15+
5
6Fixes
7json_util.c:63:35: error: a function declaration without a prototype is deprecated in all versions of C [-We
8rror,-Wstrict-prototypes]
9const char *json_util_get_last_err()
10 ^
11 void
12
13Upstream-Status: Backport [https://github.com/json-c/json-c/pull/783]
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15---
16 json_util.c | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/json_util.c b/json_util.c
20index 952770a..83d9c68 100644
21--- a/json_util.c
22+++ b/json_util.c
23@@ -60,7 +60,7 @@ static int _json_object_to_fd(int fd, struct json_object *obj, int flags, const
24
25 static char _last_err[256] = "";
26
27-const char *json_util_get_last_err()
28+const char *json_util_get_last_err(void)
29 {
30 if (_last_err[0] == '\0')
31 return NULL;
32--
332.37.2
34
diff --git a/meta/recipes-devtools/json-c/json-c_0.16.bb b/meta/recipes-devtools/json-c/json-c_0.16.bb
index 50431081bb..3aba41dfcf 100644
--- a/meta/recipes-devtools/json-c/json-c_0.16.bb
+++ b/meta/recipes-devtools/json-c/json-c_0.16.bb
@@ -6,9 +6,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2"
6 6
7SRC_URI = " \ 7SRC_URI = " \
8 https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz \ 8 https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz \
9 file://0001-Fix-build-with-clang-15.patch \
9 file://run-ptest \ 10 file://run-ptest \
10" 11"
11
12SRC_URI[sha256sum] = "8e45ac8f96ec7791eaf3bb7ee50e9c2100bbbc87b8d0f1d030c5ba8a0288d96b" 12SRC_URI[sha256sum] = "8e45ac8f96ec7791eaf3bb7ee50e9c2100bbbc87b8d0f1d030c5ba8a0288d96b"
13 13
14UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/tags" 14UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/tags"