patches/rlibtorrent-01-madvise.diff
changeset 1210 ab05acbf6dd4
child 1248 9f6e7108cd7f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/rlibtorrent-01-madvise.diff	Wed Jun 18 20:12:36 2008 +0000
@@ -0,0 +1,19 @@
+Index: libtorrent/src/data/memory_chunk.cc
+===================================================================
+--- libtorrent/src/data/memory_chunk.cc	(revision 1060)
++++ libtorrent/src/data/memory_chunk.cc	(working copy)
+@@ -41,6 +41,14 @@
+ #include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/mman.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"