multipath-tools: fix do_compile failure due to json-c upgrade
PATCH 1/1 multipath-tools: fix do_compile failure due to json-c upgrade
The new json-c does not define TRUE, so we should use 1 to avoid do_compile failure.
Signed-off-by Chen Qi <[email protected]>
--- ...01-libdmmp_private.h-Do-not-use-TRUE.patch | 31 +++++++++++++++++++ .../multipath-tools/multipath-tools_0.8.4.bb | 1 + 2 files changed, 32 insertions(+) create mode 100644 meta-oe/recipes-support/multipath-tools/files/0001-libdmmp_private.h-Do-not-use-TRUE.patch
meta-oe/recipes-support/multipath-tools/files/0001-libdmmp_private.h-Do-not-use-TRUE.patch new file +31 -0
@@ -0,0 +1,31 @@ +From cdee4a7e9f8aa880eb4f381aa4325c1ae42951f8 Mon Sep 17 00:00:00 2001 +From: Chen Qi <[email protected]> +Date: Mon, 8 Jun 2020 18:43:10 -0700 +Subject: [PATCH] libdmmp_private.h: Do not use TRUE + +As json-c has been upgraded and TRUE is not defined any more, we should +avoid using it and use 1 instead. + +Upstream-Status: Pending + +Signed-off-by: Chen Qi <[email protected]> +--- + libdmmp/libdmmp_private.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libdmmp/libdmmp_private.h b/libdmmp/libdmmp_private.h +index ac85b63f..4378962b 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; \ +-- +2.21.0 +
meta-oe/recipes-support/multipath-tools/multipath-tools_0.8.4.bb +1 -0
@@ -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-libdmmp_private.h-Do-not-use-TRUE.patch \ " LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
Signature · 1 line
2.21.0