]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
don't use fadvise if we have mmap
authorTobias Oetiker <tobi@oetiker.ch>
Mon, 8 Dec 2014 22:19:07 +0000 (23:19 +0100)
committerTobias Oetiker <tobi@oetiker.ch>
Mon, 8 Dec 2014 22:19:07 +0000 (23:19 +0100)
src/rrd_open.c

index 6838b99c3c805d35584aab2741869e76500ae8d7..af875ccea8229f6ad002196b40ed8c49e5d6d4c2 100644 (file)
@@ -236,7 +236,7 @@ rrd_file_t *rrd_open(
         lseek(rrd_simple_file->fd, 0, SEEK_SET);
     }
     no_lseek_necessary:
-#ifdef HAVE_POSIX_FADVISE
+#if !defined(HAVE_MMAP) && defined(HAVE_POSIX_FADVISE)
     /* In general we need no read-ahead when dealing with rrd_files.
        When we stop reading, it is highly unlikely that we start up again.
        In this manner we actually save time and diskaccess (and buffer cache).