File 0104-mdassemble-don-t-try-to-perform-cluster-check.patch of Package mdadm.5365
From 7d55dca2cce88de443864b1e843dd0faf9142bd7 Mon Sep 17 00:00:00 2001
From: NeilBrown <neilb@suse.com>
Date: Mon, 3 Aug 2015 11:53:01 +1000
Subject: [PATCH 152/359] mdassemble: don't try to perform cluster check.
References: bsc#1081910
mdassemble is meant to be small an simple, so avoid
trying to check for a cluster.
Currently it doesn't, but it still includes the code,
which doesn't build because the library isn't provided.
So just exclude the get_cluster_name code from mdassemble.
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Coly Li <colyli@suse.de>
---
util.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/util.c b/util.c
index ea6e688..4032fa9 100644
--- a/util.c
+++ b/util.c
@@ -1995,7 +1995,7 @@ void reopen_mddev(int mdfd)
if (fd >= 0 && fd != mdfd)
dup2(fd, mdfd);
}
-
+#ifndef MDASSEMBLE
int get_cluster_name(char **cluster_name)
{
void *lib_handle = NULL;
@@ -2043,3 +2043,4 @@ out:
dlclose(lib_handle);
return rv;
}
+#endif
--
2.16.1