From 542c8ff8938e92e6c55050058fa0691499453ced Mon Sep 17 00:00:00 2001 From: Martin Milata Date: Thu, 18 Jun 2020 14:56:20 +0200 Subject: [PATCH] multipath-tools: support json_c-0.14 --- .../linux/multipath-tools/default.nix | 5 +++++ .../linux/multipath-tools/json-c-0.14.patch | 21 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/os-specific/linux/multipath-tools/json-c-0.14.patch diff --git a/pkgs/os-specific/linux/multipath-tools/default.nix b/pkgs/os-specific/linux/multipath-tools/default.nix index d60b4a9a549..1c00ed9887d 100644 --- a/pkgs/os-specific/linux/multipath-tools/default.nix +++ b/pkgs/os-specific/linux/multipath-tools/default.nix @@ -10,6 +10,11 @@ stdenv.mkDerivation rec { sha256 = "1mgjylklh1cx8px8ffgl12kyc0ln3445vbabd2sy8chq31rpiiq8"; }; + patches = [ + # fix build with json-c 0.14 https://www.redhat.com/archives/dm-devel/2020-May/msg00261.html + ./json-c-0.14.patch + ]; + postPatch = '' substituteInPlace libmultipath/Makefile --replace /usr/include/libdevmapper.h ${lvm2}/include/libdevmapper.h sed -i -re ' diff --git a/pkgs/os-specific/linux/multipath-tools/json-c-0.14.patch b/pkgs/os-specific/linux/multipath-tools/json-c-0.14.patch new file mode 100644 index 00000000000..d5fee424883 --- /dev/null +++ b/pkgs/os-specific/linux/multipath-tools/json-c-0.14.patch @@ -0,0 +1,21 @@ +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 + #include + #include ++#include + #include + + #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; \