[PATCH 03/13] build: use MADV_NOSYNC only when it's defined

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Fabio M. Di Nitto" <fdinitto@xxxxxxxxxx>

so far only FreeBSD defines it.

Signed-off-by: Fabio M. Di Nitto <fdinitto@xxxxxxxxxx>
---
:100644 100644 591e80b... e69635d... M	exec/cpg.c
:100644 100644 55949f5... 8383a03... M	lib/cpg.c
 exec/cpg.c |    2 +-
 lib/cpg.c  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/exec/cpg.c b/exec/cpg.c
index 591e80b..e69635d 100644
--- a/exec/cpg.c
+++ b/exec/cpg.c
@@ -1633,7 +1633,7 @@ memory_map (
 		munmap(addr_orig, bytes);
 		goto error_close_unlink;
 	}
-#ifdef COROSYNC_BSD
+#ifdef MADV_NOSYNC
 	madvise(addr, bytes, MADV_NOSYNC);
 #endif
 
diff --git a/lib/cpg.c b/lib/cpg.c
index 55949f5..8383a03 100644
--- a/lib/cpg.c
+++ b/lib/cpg.c
@@ -780,7 +780,7 @@ retry_write:
 	if (addr != addr_orig) {
 		goto error_close_unlink;
 	}
-#ifdef COROSYNC_BSD
+#ifdef MADV_NOSYNC
 	madvise(addr_orig, bytes, MADV_NOSYNC);
 #endif
 
-- 
1.7.7.6

_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss


[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux