From 538b463d9823d1fe6c06e984632bfa830677cfee Mon Sep 17 00:00:00 2001 From: Bernd Zeimetz Date: Mon, 11 Feb 2008 12:00:04 +0100 Subject: [PATCH] Implicit declaration fix --- debian/patches/implicit-decl-fix | 31 +++++++++++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 32 insertions(+) create mode 100644 debian/patches/implicit-decl-fix diff --git a/debian/patches/implicit-decl-fix b/debian/patches/implicit-decl-fix new file mode 100644 index 0000000..ebec677 --- /dev/null +++ b/debian/patches/implicit-decl-fix @@ -0,0 +1,31 @@ +Index: rrdtool/src/rrd_tool.c +=================================================================== +--- rrdtool.orig/src/rrd_tool.c 2008-02-11 11:07:55.000000000 +0100 ++++ rrdtool/src/rrd_tool.c 2008-02-11 11:08:10.000000000 +0100 +@@ -4,6 +4,8 @@ + * rrd_tool.c Startup wrapper + *****************************************************************************/ + ++#include ++ + #include "rrd_tool.h" + #include "rrd_xport.h" + +Index: rrdtool/src/rrd_update.c +=================================================================== +--- rrdtool.orig/src/rrd_update.c 2008-02-11 11:47:32.000000000 +0100 ++++ rrdtool/src/rrd_update.c 2008-02-11 11:47:48.000000000 +0100 +@@ -430,8 +430,13 @@ + #ifdef HAVE_MADVISE + /* when we use mmaping we tell the kernel the mmap equivalent + of POSIX_FADV_RANDOM */ ++#ifdef __USE_BSD + madvise(rrd_mmaped_file,rrd_filesize,POSIX_MADV_RANDOM); + #endif ++#ifdef __USE_XOPEN2K ++ posix_madvise(rrd_mmaped_file,rrd_filesize,POSIX_MADV_RANDOM); ++#endif ++#endif + #endif + /* loop through the arguments. */ + for(arg_i=0; arg_i