From: "Fabio M. Di Nitto" <fdinitto@xxxxxxxxxx> define it only in case it's not there Signed-off-by: Fabio M. Di Nitto <fdinitto@xxxxxxxxxx> --- :100644 100644 5c8fe7f... c2aa47b... M configure.ac :100644 100644 e69635d... 209aaaa... M exec/cpg.c :100644 100644 8383a03... a781e42... M lib/cpg.c configure.ac | 4 ---- exec/cpg.c | 4 ++++ lib/cpg.c | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 5c8fe7f..c2aa47b 100644 --- a/configure.ac +++ b/configure.ac @@ -343,14 +343,10 @@ case "$host_os" in DARWIN_OPTS="-dynamiclib -bind_at_load \ -current_version ${SONAME} \ -compatibility_version ${SONAME} -install_name \$(libdir)/\$(@)" - AC_DEFINE_UNQUOTED([MAP_ANONYMOUS], [MAP_ANON], - [Shared memory define for Darwin platform]) ;; *bsd*) AC_DEFINE_UNQUOTED([COROSYNC_BSD], [1], [Compiling for BSD platform]) - AC_DEFINE_UNQUOTED([MAP_ANONYMOUS], [MAP_ANON], - [Shared memory define for Darwin platform]) ;; *solaris*) AC_DEFINE_UNQUOTED([COROSYNC_SOLARIS], [1], diff --git a/exec/cpg.c b/exec/cpg.c index e69635d..209aaaa 100644 --- a/exec/cpg.c +++ b/exec/cpg.c @@ -67,6 +67,10 @@ #include <corosync/cpg.h> #include <corosync/ipc_cpg.h> +#ifndef MAP_ANONYMOUS +#define MAP_ANONYMOUS MAP_ANON +#endif + #include "service.h" LOGSYS_DECLARE_SUBSYS ("CPG"); diff --git a/lib/cpg.c b/lib/cpg.c index 8383a03..a781e42 100644 --- a/lib/cpg.c +++ b/lib/cpg.c @@ -63,6 +63,10 @@ #include "util.h" +#ifndef MAP_ANONYMOUS +#define MAP_ANONYMOUS MAP_ANON +#endif + struct cpg_inst { qb_ipcc_connection_t *c; int finalize; -- 1.7.7.6 _______________________________________________ discuss mailing list discuss@xxxxxxxxxxxx http://lists.corosync.org/mailman/listinfo/discuss