diff options
Diffstat (limited to 'databases/rrdtool/patches')
-rw-r--r-- | databases/rrdtool/patches/patch-aa | 34 | ||||
-rw-r--r-- | databases/rrdtool/patches/patch-ab | 38 |
2 files changed, 54 insertions, 18 deletions
diff --git a/databases/rrdtool/patches/patch-aa b/databases/rrdtool/patches/patch-aa index 4f9765cf545..0aa0d38c07e 100644 --- a/databases/rrdtool/patches/patch-aa +++ b/databases/rrdtool/patches/patch-aa @@ -1,21 +1,19 @@ -$NetBSD: patch-aa,v 1.8 2007/11/20 11:58:00 martti Exp $ +$NetBSD: patch-aa,v 1.9 2007/11/21 07:50:14 martti Exp $ ---- src/rrd_tool.h.orig 2007-11-20 02:15:10.000000000 +0200 -+++ src/rrd_tool.h 2007-11-20 13:47:45.000000000 +0200 -@@ -202,6 +202,16 @@ - +Index: src/rrd_update.c +=================================================================== +--- src/rrd_update.c (revision 1235) ++++ src/rrd_update.c (working copy) +@@ -427,10 +427,10 @@ + fclose(rrd_file); + return(-1); + } +-#ifdef HAVE_MADVISE ++#ifdef USE_MADVISE + /* when we use mmaping we tell the kernel the mmap equivalent + of POSIX_FADV_RANDOM */ +- madvise(rrd_mmaped_file,rrd_filesize,POSIX_MADV_RANDOM); ++ madvise(rrd_mmaped_file,rrd_filesize,MADV_RANDOM); #endif - -+#if defined(__NetBSD__) -+# if !defined(_NETBSD_SOURCE) -+# define _NETBSD_SOURCE -+# endif -+ -+# if !defined(POSIX_MADV_RANDOM) -+# define POSIX_MADV_RANDOM MADV_RANDOM -+# endif -+#endif -+ - #ifdef __cplusplus - } #endif + /* loop through the arguments. */ diff --git a/databases/rrdtool/patches/patch-ab b/databases/rrdtool/patches/patch-ab new file mode 100644 index 00000000000..5dd69e098b5 --- /dev/null +++ b/databases/rrdtool/patches/patch-ab @@ -0,0 +1,38 @@ +$NetBSD: patch-ab,v 1.7 2007/11/21 07:50:14 martti Exp $ + +--- configure.ac (revision 1235) ++++ configure.ac (working copy) +@@ -49,6 +49,13 @@ + /* realloc does not support NULL as argument */ + #undef NO_NULL_REALLOC + ++/* lets enable madvise defines in netbsd */ ++#if defined(__NetBSD__) ++# if !defined(_NETBSD_SOURCE) ++# define _NETBSD_SOURCE ++# endif ++#endif ++ + ]) + + AH_BOTTOM([ +@@ -58,6 +65,19 @@ + #include <fcntl.h> + #endif + ++#if !defined HAVE_MADVISE && defined HAVE_POSIX_MADVISE ++/* use posix_madvise family */ ++# define madvise posix_madvise ++# define MADV_NORMAL POSIX_MADV_NORMAL ++# define MADV_RANDOM POSIX_MADV_RANDOM ++# define MADV_SEQUENTIAL POSIX_MADV_SEQUENTIAL ++# define MADV_WILLNEED POSIX_MADV_WILLNEED ++# define MADV_DONTNEED POSIX_MADV_DONTNEED ++#endif ++#if defined HAVE_MADVISE || defined HAVE_POSIX_MADVISE ++# define USE_MADVISE 1 ++#endif ++ + /* define strrchr, strchr and memcpy, memmove in terms of bsd funcs + make sure you are NOT using bcopy, index or rindex in the code */ + |