diff -Naur libtorrent-0.12.5/src/data/memory_chunk.cc libtorrent-0.12.5.patched/src/data/memory_chunk.cc --- libtorrent-0.12.5/src/data/memory_chunk.cc 2008-10-07 08:49:49.000000000 -0400 +++ libtorrent-0.12.5.patched/src/data/memory_chunk.cc 2009-10-29 23:56:17.017952666 -0400 @@ -46,6 +46,14 @@ #include "torrent/exceptions.h" #include "memory_chunk.h" +#ifdef __sun__ +extern "C" int madvise(void *, size_t, int); +//#include +//Should be the include line instead, but Solaris +//has an annoying bug wherein it doesn't declare +//madvise for C++. +#endif + namespace torrent { uint32_t MemoryChunk::m_pagesize = getpagesize();