From b831829cedefd7fb614b8631cc25339a00192ec1 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Fri, 15 Aug 2014 16:12:43 +1000 Subject: ctdb-client: Rename static function server_id_equal() Otherwise it conflicts with the same function provided by Samba's lib/util. Using the Samba one drags in too many dependencies, so rename the CTDB version to avoid a declaration clash when CTDB starts including samba_util.h. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- ctdb/client/ctdb_client.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ctdb/client/ctdb_client.c b/ctdb/client/ctdb_client.c index df57302de0..3e19d10b95 100644 --- a/ctdb/client/ctdb_client.c +++ b/ctdb/client/ctdb_client.c @@ -3798,7 +3798,10 @@ static struct server_id server_id_get(struct ctdb_context *ctdb, uint32_t reqid) return id; } -static bool server_id_equal(struct server_id *id1, struct server_id *id2) +/* This is basically a copy from Samba's server_id.*. However, a + * dependency chain stops us from using Samba's version, so use a + * renamed copy until a better solution is found. */ +static bool ctdb_server_id_equal(struct server_id *id1, struct server_id *id2) { if (id1->pid != id2->pid) { return false; @@ -3936,7 +3939,7 @@ again: i = 0; while (i < locks->num) { - if (server_id_equal(&locks->lock[i].id, &id)) { + if (ctdb_server_id_equal(&locks->lock[i].id, &id)) { /* Internal error */ talloc_free(h); return false; @@ -4024,7 +4027,7 @@ static bool g_lock_unlock(TALLOC_CTX *mem_ctx, id = server_id_get(ctdb_db->ctdb, reqid); for (i=0; inum; i++) { - if (server_id_equal(&locks->lock[i].id, &id)) { + if (ctdb_server_id_equal(&locks->lock[i].id, &id)) { if (i < locks->num-1) { locks->lock[i] = locks->lock[locks->num-1]; } -- cgit