device-mapper-multipath/0029-fix-boolean-value-with-json-c-0.14.patch
Benjamin Marzinski 2b0cd7cceb device-mapper-multipath-0.8.4-2
Rebased on top of Martin Wilck's queue of ACKed upstream commits
  * https://github.com/openSUSE/multipath-tools/tree/upstream-queue
  * All previous patches have been reordered, with the exception of
    0011-libdmmp-Add-support-for-upcoming-json-c-0.14.0.patch
    which has been replaced with
    0029-fix-boolean-value-with-json-c-0.14.patch
Modify 0054-RH-add-mpathconf.patch
  * remove default enable_foreign and property blacklist_exceptions
    settings, and deal with the builtin default change from
    0031-libmultipath-set-enable_foreign-to-NONE-by-default.patch.
    Fixes bz #1853668
Add 0048-Makefile.inc-trim-extra-information-from-systemd-ver.patch
Add 0049-kpartx-fix-Wsign-compare-error.patch
  * The above two patches have been submitted upstream
2020-07-08 23:16:57 -05:00

42 lines
1.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "mail@eworm.de" <mail@eworm.de>
Date: Sat, 25 Apr 2020 21:11:13 +0200
Subject: [PATCH] fix boolean value with json-c 0.14
Upstream json-c removed the TRUE and FALSE defines in commit
0992aac61f8b087efd7094e9ac2b84fa9c040fcd.
[mwilck]: Use stdbool.h, and keep the log message unchanged.
Signed-off-by: Christian Hesse <mail@eworm.de>
Signed-off-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
libdmmp/libdmmp_private.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libdmmp/libdmmp_private.h b/libdmmp/libdmmp_private.h
index ac85b63f..b1a6ddea 100644
--- a/libdmmp/libdmmp_private.h
+++ b/libdmmp/libdmmp_private.h
@@ -30,6 +30,7 @@
#include <stdint.h>
#include <string.h>
#include <assert.h>
+#include <stdbool.h>
#include <json.h>
#include "libdmmp/libdmmp.h"
@@ -82,7 +83,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) != true) { \
_error(ctx, "Invalid JSON output from multipathd IPC: " \
"key '%s' not found", key); \
rc = DMMP_ERR_IPC_ERROR; \
--
2.17.2