make MAP_PRIVATE conditional on AIX not being defined ... should fix part of #216
[rrdtool.git] / src / rrd_open.c
index 9f4f6e2..5f3723f 100644 (file)
@@ -6,19 +6,21 @@
  * $Id$
  *****************************************************************************/
 
+#include "rrd_tool.h"
+#include "unused.h"
+
 #ifdef WIN32
 #include <stdlib.h>
 #include <fcntl.h>
 #include <sys/stat.h>
 #endif
 
+
 #ifdef HAVE_BROKEN_MS_ASYNC
 #include <sys/types.h>
 #include <utime.h>
 #endif
 
-#include "rrd_tool.h"
-#include "unused.h"
 #define MEMBLK 8192
 
 #ifdef WIN32
@@ -156,7 +158,9 @@ rrd_file_t *rrd_open(
     if (rdwr & RRD_READONLY) {
         flags |= O_RDONLY;
 #ifdef HAVE_MMAP
+# if !defined(AIX)
         rrd_simple_file->mm_flags = MAP_PRIVATE;
+# endif
 # ifdef MAP_NORESERVE
         rrd_simple_file->mm_flags |= MAP_NORESERVE;  /* readonly, so no swap backing needed */
 # endif