Code

* New upstream release.
[pkg-rrdtool.git] / debian / patches / implicit-decl-fix
1 Index: rrdtool/src/rrd_tool.c
2 ===================================================================
3 --- rrdtool.orig/src/rrd_tool.c 2008-02-24 14:05:10.000000000 +0100
4 +++ rrdtool/src/rrd_tool.c      2008-02-24 14:24:37.000000000 +0100
5 @@ -4,6 +4,8 @@
6   * rrd_tool.c  Startup wrapper
7   *****************************************************************************/
8  
9 +#include <unistd.h>
10 +
11  #include "rrd_tool.h"
12  #include "rrd_xport.h"
13  
14 Index: rrdtool/src/rrd_update.c
15 ===================================================================
16 --- rrdtool.orig/src/rrd_update.c       2008-02-24 14:05:10.000000000 +0100
17 +++ rrdtool/src/rrd_update.c    2008-02-24 14:28:33.000000000 +0100
18 @@ -432,7 +432,12 @@
19  #ifdef USE_MADVISE
20      /* when we use mmaping we tell the kernel the mmap equivalent
21         of POSIX_FADV_RANDOM */
22 -    madvise(rrd_mmaped_file,rrd_filesize,MADV_RANDOM);
23 +#ifdef __USE_BSD
24 +      madvise(rrd_mmaped_file,rrd_filesize,MADV_RANDOM);
25 +#endif
26 +#ifdef __USE_XOPEN2K
27 +    posix_madvise(rrd_mmaped_file,rrd_filesize,MADV_RANDOM);
28 +#endif
29  #endif
30  #endif
31      /* loop through the arguments. */