$NetBSD: patch-ad,v 1.1 2007/01/04 12:45:41 tron Exp $

--- src/data/memory_chunk.cc.orig	2006-10-27 15:48:42.000000000 +0200
+++ src/data/memory_chunk.cc
@@ -37,6 +37,14 @@
 #include "config.h"
 
 #include <unistd.h>
+#if defined(__sun) && defined(__SVR4)
+/* Ugly hack to make this compile on Solaris. See
+ * http://www.opensolaris.org/jive/thread.jspa?threadID=21035&tstart=0
+ */
+extern "C" {
+  extern int madvise(caddr_t, size_t, int);
+}
+#endif
 #include <rak/error_number.h>
 
 #include "torrent/exceptions.h"
