Fabio mentioned that this warning indicated a problem on sparc:

  coroipcc.c:547: warning: cast increases required alignment of target type

Here's an untested patch:

>From 1de204ef31c9cb15dfef531ca7f427fc1f79b910 Mon Sep 17 00:00:00 2001
From: Jim Meyering <[email protected]>
Date: Mon, 23 Mar 2009 08:47:02 +0100
Subject: [PATCH] adjust "shared_memory" alignment to avoid bus error on sparc

* include/corosync/ipc_gen.h (REQ_SIZE, RES_SIZE, RE DISPATCH_SIZE):
Define to be a power of 2.  This ensures that res_buffer and
dispatch_buffer are sufficiently well aligned for e.g., the sparc ABI.
Improved alignment can also improve performance.
---
 include/corosync/ipc_gen.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/corosync/ipc_gen.h b/include/corosync/ipc_gen.h
index 3e42e85..051b027 100644
--- a/include/corosync/ipc_gen.h
+++ b/include/corosync/ipc_gen.h
@@ -64,9 +64,9 @@ enum req_init_types {
 #define MESSAGE_REQ_CHANGE_EUID                1
 #define MESSAGE_REQ_OUTQ_FLUSH         2

-#define REQ_SIZE                       1000000
-#define RES_SIZE                       1000000
-#define DISPATCH_SIZE                  1000000
+#define REQ_SIZE                       (1024*1024)
+#define RES_SIZE                       (1024*1024)
+#define DISPATCH_SIZE                  (1024*1024)

 struct shared_memory {
        unsigned char req_buffer[REQ_SIZE];
--
1.6.2.rc1.285.gc5f54
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to