summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-12-17 23:44:04 +0000
committerAlan Conway <aconway@apache.org>2008-12-17 23:44:04 +0000
commitac3a06a8c1d5d898d582e015ee53ecd2ac4bad7d (patch)
tree66149a7a392129fba5c43dfd661c258d5e8573a3 /cpp/src/qpid/cluster
parentc146f7f3af6ecac234498102e97175927347bd71 (diff)
downloadqpid-python-ac3a06a8c1d5d898d582e015ee53ecd2ac4bad7d.tar.gz
Handle package name changes in Fedora10: openais->corosync cman->cmanlib
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@727583 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster')
-rw-r--r--cpp/src/qpid/cluster/Cpg.cpp5
-rw-r--r--cpp/src/qpid/cluster/Cpg.h4
-rw-r--r--cpp/src/qpid/cluster/types.h10
3 files changed, 13 insertions, 6 deletions
diff --git a/cpp/src/qpid/cluster/Cpg.cpp b/cpp/src/qpid/cluster/Cpg.cpp
index 0d7b15cfa8..48c3b483f9 100644
--- a/cpp/src/qpid/cluster/Cpg.cpp
+++ b/cpp/src/qpid/cluster/Cpg.cpp
@@ -69,7 +69,10 @@ int Cpg::getFd() {
}
Cpg::Cpg(Handler& h) : IOHandle(new sys::IOHandlePrivate), handler(h), isShutdown(false) {
- cpg_callbacks_t callbacks = { &globalDeliver, &globalConfigChange };
+ cpg_callbacks_t callbacks;
+ ::memset(&callbacks, sizeof(callbacks), 0);
+ callbacks.cpg_deliver_fn = &globalDeliver;
+ callbacks.cpg_confchg_fn = &globalConfigChange;
check(cpg_initialize(&handle, &callbacks), "Cannot initialize CPG");
check(cpg_context_set(handle, this), "Cannot set CPG context");
// Note: CPG is currently unix-specific. If CPG is ported to
diff --git a/cpp/src/qpid/cluster/Cpg.h b/cpp/src/qpid/cluster/Cpg.h
index 2bd58cea1f..5de2b516d5 100644
--- a/cpp/src/qpid/cluster/Cpg.h
+++ b/cpp/src/qpid/cluster/Cpg.h
@@ -30,10 +30,6 @@
#include <cassert>
#include <string.h>
-extern "C" {
-#include <openais/cpg.h>
-}
-
namespace qpid {
namespace cluster {
diff --git a/cpp/src/qpid/cluster/types.h b/cpp/src/qpid/cluster/types.h
index 3ee20c4692..857b19cc8a 100644
--- a/cpp/src/qpid/cluster/types.h
+++ b/cpp/src/qpid/cluster/types.h
@@ -22,8 +22,10 @@
*
*/
+
#include "ClusterLeaveException.h"
-#include <qpid/Url.h>
+#include "config.h"
+#include "qpid/Url.h"
#include <utility>
#include <iosfwd>
@@ -32,7 +34,13 @@
#include <stdint.h>
extern "C" {
+#ifdef HAVE_OPENAIS_CPG_H
#include <openais/cpg.h>
+#elif HAVE_COROSYNC_CPG_H
+# include <corosync/cpg.h>
+#else
+# error "No cpg.h header file available"
+#endif
}
namespace qpid {