components/libtorrent/patches/rlibtorrent-01-madvise.patch
author Sonam Gupta <sonam.x.gupta@oracle.com>
Sun, 17 Feb 2013 21:51:48 -0800
branchs11u1-sru
changeset 2495 eb04a6ca141d
parent 248 3011f7a1ed77
child 6932 ae9e3811b2ec
permissions -rw-r--r--
15698471 cups should audit printing information in TX environments 14850597 TX printing is reported to print jobs even when request authorization fail. 16182423 Update error code for all the failed use of authorization records in CUPS 16182458 Print 3 files requesting nolabel and nobanner should produce 6 audit records 16201093 For remote print requests, the path token in AR from GZ needs modification
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
248
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     1
--- libtorrent-0.12.2.orig/src/data/memory_chunk.cc	(revision 1060)
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     2
+++ libtorrent-0.12.2/src/data/memory_chunk.cc	(working copy)
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     3
@@ -41,6 +41,16 @@
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     4
 #include <unistd.h>
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     5
 #include <sys/types.h>
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     6
 #include <sys/mman.h>
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     7
+#if defined(__sun) && defined(__SVR4)
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     8
+/* Ugly hack to make this compile on Solaris with g++. See
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     9
+ * http://www.opensolaris.org/jive/thread.jspa?threadID=21035&tstart=0
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    10
+ */
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    11
+#if (_POSIX_C_SOURCE > 2) || defined(_XPG4_2)
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    12
+extern "C" {
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    13
+extern int madvise(caddr_t, size_t, int);
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    14
+}
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    15
+#endif
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    16
+#endif
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    17
 #include <rak/error_number.h>
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    18
 
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    19
 #include "torrent/exceptions.h"
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    20
--- libtorrent-0.12.2.orig/scripts/common.m4	2008-05-07 08:19:12.000000000 -0400
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    21
+++ libtorrent-0.12.2/scripts/common.m4	2008-06-23 17:04:24.567475080 -0400
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    22
@@ -170,7 +170,7 @@
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    23
   AC_COMPILE_IFELSE(
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    24
     [[#include <sys/types.h>
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    25
           #include <sys/mman.h>
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    26
-          void f() { static char test[1024]; madvise((void *)test, sizeof(test), MADV_NORMAL); }
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    27
+          void f() { static char test[1024]; madvise((char *)test, sizeof(test), MADV_NORMAL); }
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    28
     ]],
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    29
     [
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    30
       AC_MSG_RESULT(yes)