From 4d039bd1691520cc7632030d0d49e02ab0f7b3b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Baumbach?= Date: Tue, 30 Oct 2012 13:26:24 +0100 Subject: [PATCH 1/4] build(autoconf): check if we have ctdb_protocol.h in the cluster checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Part 1/4 of fix for bug #9348. Signed-off-by: Björn Baumbach Reviewed-by: Michael Adam (cherry picked from commit d113d8aea5411e5e0701891f44b95d6d916b1271) --- source3/configure.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/source3/configure.in b/source3/configure.in index 641d1f6..2dfc388 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -4969,7 +4969,7 @@ ctdb_broken="no" SAVED_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS ${SAMBA_CONFIGURE_CPPFLAGS} $CTDB_CPPFLAGS" -AC_CHECK_HEADERS(ctdb.h ctdb_private.h,,,[ +AC_CHECK_HEADERS(ctdb.h ctdb_private.h ctdb_protocol.h ,,,[ #include "confdefs.h" #define NO_CONFIG_H #include "replace.h" -- 1.7.8.6 From e10b2f450408729d9b19adf8e49b8eded2c35a17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Baumbach?= Date: Tue, 30 Oct 2012 13:59:41 +0100 Subject: [PATCH 2/4] build(waf): check if we have ctdb_protocol.h in the cluster checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Part 2/4 of fix for bug #9348. Signed-off-by: Björn Baumbach Reviewed-by: Michael Adam (cherry picked from commit bf269d6b5a6783e2479ac455b8e085a5d8ad9e9e) --- source3/wscript | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/source3/wscript b/source3/wscript index 3e11715..c6b6075 100644 --- a/source3/wscript +++ b/source3/wscript @@ -1368,6 +1368,28 @@ main() { #include "replace.h" #include "system/wait.h" #include "system/network.h" + #define private #error __USED_RESERVED_WORD_private__ + #include + #include + #include + #include + + int main(void) + { + return 0; + } + ''', + 'HAVE_CTDB_PROTOCOL_H', + addmain=False, + includes=includes, + msg='Checking for header ctdb_protocol.h') + + if have_cluster_support: + conf.CHECK_CODE(''' + #define NO_CONFIG_H + #include "replace.h" + #include "system/wait.h" + #include "system/network.h" #include #include #include -- 1.7.8.6 From 0f279ebd5232cc655d464709d99fabb29924c7d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Baumbach?= Date: Wed, 17 Oct 2012 16:54:33 +0200 Subject: [PATCH 3/4] s3:ctdb library: fix the build against older ctdb versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit by checking if we have the ctdb_protocol.h and including ctdb_private.h otherwise. Part 3/4 of fix bug #9348. Signed-off-by: Björn Baumbach Reviewed-by: Michael Adam (cherry picked from commit 541bde605e8a1158411436c4f7fdc314dfdbff23) --- source3/lib/ctdb_conn.h | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/source3/lib/ctdb_conn.h b/source3/lib/ctdb_conn.h index 9229536..0d648c7 100644 --- a/source3/lib/ctdb_conn.h +++ b/source3/lib/ctdb_conn.h @@ -23,7 +23,12 @@ #ifdef CLUSTER_SUPPORT #include + +#ifdef HAVE_CTDB_PROTOCOL_H #include +#else +#include +#endif #else /* CLUSTER_SUPPORT */ -- 1.7.8.6 From 4b98289e6a4634010c5b399cee6af49e7f0da194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Baumbach?= Date: Tue, 30 Oct 2012 16:45:30 +0100 Subject: [PATCH 4/4] s3-torture:test_ctdbconn: fix the build against older ctdb versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit by checking if we have the ctdb_protocol.h and including ctdb_private.h otherwise. Part 4/4 of fix for bug #9348. Signed-off-by: Björn Baumbach Reviewed-by: Michael Adam (cherry picked from commit 5f1b5404b8e642dd18b55e37793068216f668242) --- source3/torture/test_ctdbconn.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/source3/torture/test_ctdbconn.c b/source3/torture/test_ctdbconn.c index 539e224..d018352 100644 --- a/source3/torture/test_ctdbconn.c +++ b/source3/torture/test_ctdbconn.c @@ -25,7 +25,13 @@ #include "ctdb_conn.h" #include "lib/util/tevent_unix.h" #include "tdb.h" + +#ifdef HAVE_CTDB_PROTOCOL_H #include "ctdb_protocol.h" +#else +#include "ctdb_private.h" +#endif + #include "messages.h" struct ctdb_conn_test_state { -- 1.7.8.6