deleted a bit much from rrd_open ... merged back in
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Fri, 5 Dec 2008 15:23:45 +0000 (15:23 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Fri, 5 Dec 2008 15:23:45 +0000 (15:23 +0000)
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1697 a5681a0c-68f1-0310-ab6d-d61299d08faa

src/rrd_open.c

index 5a908da..d2ec549 100644 (file)
@@ -174,6 +174,10 @@ rrd_file_t *rrd_open(
     } else {
         if (rdwr & RRD_READWRITE) {
             flags |= O_RDWR;
+#ifdef HAVE_MMAP 
+            rrd_simple_file->mm_flags = MAP_SHARED; 
+            rrd_simple_file->mm_prot |= PROT_WRITE; 
+#endif 
         }
         if (rdwr & RRD_CREAT) {
             flags |= (O_CREAT | O_TRUNC);