1263
|
1 |
--- libtorrent-0.12.2.orig/src/data/memory_chunk.cc (revision 1060)
|
|
2 |
+++ libtorrent-0.12.2/src/data/memory_chunk.cc (working copy)
|
|
3 |
@@ -41,6 +41,16 @@
|
|
4 |
#include <unistd.h>
|
|
5 |
#include <sys/types.h>
|
|
6 |
#include <sys/mman.h>
|
|
7 |
+#if defined(__sun) && defined(__SVR4)
|
|
8 |
+/* Ugly hack to make this compile on Solaris with g++. See
|
|
9 |
+ * http://www.opensolaris.org/jive/thread.jspa?threadID=21035&tstart=0
|
|
10 |
+ */
|
|
11 |
+#if (_POSIX_C_SOURCE > 2) || defined(_XPG4_2)
|
|
12 |
+extern "C" {
|
|
13 |
+extern int madvise(caddr_t, size_t, int);
|
|
14 |
+}
|
|
15 |
+#endif
|
|
16 |
+#endif
|
|
17 |
#include <rak/error_number.h>
|
|
18 |
|
|
19 |
#include "torrent/exceptions.h"
|
1248
|
20 |
--- libtorrent-0.12.2.orig/scripts/common.m4 2008-05-07 08:19:12.000000000 -0400
|
|
21 |
+++ libtorrent-0.12.2/scripts/common.m4 2008-06-23 17:04:24.567475080 -0400
|
|
22 |
@@ -170,7 +170,7 @@
|
|
23 |
AC_COMPILE_IFELSE(
|
|
24 |
[[#include <sys/types.h>
|
|
25 |
#include <sys/mman.h>
|
|
26 |
- void f() { static char test[1024]; madvise((void *)test, sizeof(test), MADV_NORMAL); }
|
|
27 |
+ void f() { static char test[1024]; madvise((char *)test, sizeof(test), MADV_NORMAL); }
|
|
28 |
]],
|
|
29 |
[
|
|
30 |
AC_MSG_RESULT(yes)
|