aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/multipath-tools
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-06-03 16:06:56 -0700
committerKhem Raj <raj.khem@gmail.com>2020-06-05 18:43:15 -0700
commit1b0ce2ce1d388d223ff337e5683d9b026b7082ba (patch)
treeb16a943ea4d6e47761326383858701809330e142 /meta-oe/recipes-support/multipath-tools
parentc13b51f12b25e49354c16302ceb7aaeb2bb8f8a7 (diff)
downloadmeta-openembedded-contrib-1b0ce2ce1d388d223ff337e5683d9b026b7082ba.tar.gz
multipath-tools: Fix build with json-c 0.14 and newer
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/multipath-tools')
-rw-r--r--meta-oe/recipes-support/multipath-tools/files/0001-fix-boolean-value-with-json-c-0.14.patch42
-rw-r--r--meta-oe/recipes-support/multipath-tools/multipath-tools_0.8.4.bb1
2 files changed, 43 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/multipath-tools/files/0001-fix-boolean-value-with-json-c-0.14.patch b/meta-oe/recipes-support/multipath-tools/files/0001-fix-boolean-value-with-json-c-0.14.patch
new file mode 100644
index 0000000000..cf97b491e1
--- /dev/null
+++ b/meta-oe/recipes-support/multipath-tools/files/0001-fix-boolean-value-with-json-c-0.14.patch
@@ -0,0 +1,42 @@
+From 5ae81386a8cfea4180738c261cd3f7944a631199 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 3 Jun 2020 16:03:56 -0700
+Subject: [PATCH] fix boolean value with json-c 0.14
+
+Patch from Christian Hesse posted here
+https://www.spinics.net/lists/dm-devel/msg40646.html
+
+Upstream json-c 0.14+ removed the TRUE and FALSE defines in commit
+0992aac61f8b087efd7094e9ac2b84fa9c040fcd.
+
+Upstream-Status: Submitted [https://www.spinics.net/lists/dm-devel/msg40646.html]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libdmmp/libdmmp_private.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libdmmp/libdmmp_private.h b/libdmmp/libdmmp_private.h
+index ac85b63f..29400826 100644
+--- a/libdmmp/libdmmp_private.h
++++ b/libdmmp/libdmmp_private.h
+@@ -82,7 +82,7 @@ static out_type func_name(struct dmmp_context *ctx, const char *var_name) { \
+ do { \
+ json_type j_type = json_type_null; \
+ json_object *j_obj_tmp = NULL; \
+- if (json_object_object_get_ex(j_obj, key, &j_obj_tmp) != TRUE) { \
++ if (json_object_object_get_ex(j_obj, key, &j_obj_tmp) != 1) { \
+ _error(ctx, "Invalid JSON output from multipathd IPC: " \
+ "key '%s' not found", key); \
+ rc = DMMP_ERR_IPC_ERROR; \
+@@ -90,7 +90,7 @@ do { \
+ } \
+ if (j_obj_tmp == NULL) { \
+ _error(ctx, "BUG: Got NULL j_obj_tmp from " \
+- "json_object_object_get_ex() while it return TRUE"); \
++ "json_object_object_get_ex() while it return 1"); \
+ rc = DMMP_ERR_BUG; \
+ goto out; \
+ } \
+--
+2.27.0
+
diff --git a/meta-oe/recipes-support/multipath-tools/multipath-tools_0.8.4.bb b/meta-oe/recipes-support/multipath-tools/multipath-tools_0.8.4.bb
index af34a4b392..0d03191373 100644
--- a/meta-oe/recipes-support/multipath-tools/multipath-tools_0.8.4.bb
+++ b/meta-oe/recipes-support/multipath-tools/multipath-tools_0.8.4.bb
@@ -45,6 +45,7 @@ SRC_URI = "git://git.opensvc.com/multipath-tools/.git;protocol=http \
file://0031-Always-use-devmapper-for-kpartx.patch \
file://0001-fix-bug-of-do_compile-and-do_install.patch \
file://0001-add-explicit-dependency-on-libraries.patch \
+ file://0001-fix-boolean-value-with-json-c-0.14.patch \
"
LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"