Code

Implicit declaration fix
[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-11 11:07:55.000000000 +0100
4 +++ rrdtool/src/rrd_tool.c      2008-02-11 11:08:10.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-11 11:47:32.000000000 +0100
17 +++ rrdtool/src/rrd_update.c    2008-02-11 11:47:48.000000000 +0100
18 @@ -430,8 +430,13 @@
19  #ifdef HAVE_MADVISE
20      /* when we use mmaping we tell the kernel the mmap equivalent
21         of POSIX_FADV_RANDOM */
22 +#ifdef __USE_BSD
23      madvise(rrd_mmaped_file,rrd_filesize,POSIX_MADV_RANDOM);
24  #endif
25 +#ifdef __USE_XOPEN2K
26 +    posix_madvise(rrd_mmaped_file,rrd_filesize,POSIX_MADV_RANDOM);
27 +#endif
28 +#endif
29  #endif
30      /* loop through the arguments. */
31      for(arg_i=0; arg_i<argc;arg_i++) {