mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 22:20:51 +00:00
multipath-tools: support json_c-0.14
This commit is contained in:
parent
9d1b3a1555
commit
542c8ff893
|
@ -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 '
|
||||
|
|
21
pkgs/os-specific/linux/multipath-tools/json-c-0.14.patch
Normal file
21
pkgs/os-specific/linux/multipath-tools/json-c-0.14.patch
Normal file
|
@ -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 <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; \
|
Loading…
Reference in a new issue