From c3fbac008ec626bf18e22caedff37fbbcef91b15 Mon Sep 17 00:00:00 2001 From: oetiker Date: Sat, 7 Jun 2008 14:35:03 +0000 Subject: [PATCH] don't bother with don't need when there is neither madvise not fadvise calls git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1404 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_open.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/program/src/rrd_open.c b/program/src/rrd_open.c index c0e48359..e92ae5d1 100644 --- a/program/src/rrd_open.c +++ b/program/src/rrd_open.c @@ -34,10 +34,11 @@ #endif /* get the address of the start of this page */ +#if defined USE_MADVISE || defined HAVE_POSIX_FADVISE #ifndef PAGE_START #define PAGE_START(addr) ((addr)&(~(_page_size-1))) #endif - +#endif /* Open a database file, return its header and an open filehandle, * positioned to the first cdp in the first rra. @@ -316,6 +317,7 @@ void rrd_dontneed( rrd_file_t *rrd_file, rrd_t *rrd) { +#if defined USE_MADVISE || defined HAVE_POSIX_FADVISE unsigned long dontneed_start; unsigned long rra_start; unsigned long active_block; @@ -369,8 +371,13 @@ void rrd_dontneed( #if defined DEBUG && DEBUG > 1 mincore_print(rrd_file, "after"); #endif +#endif /* without madvise and posix_fadvise ist does not make much sense todo anything */ } + + + + int rrd_close( rrd_file_t *rrd_file) { -- 2.30.2