libtorrent: fix GCC 4.6 bustage
authorStephen Walker <stephendwalker@gmail.com>
Sun, 26 Feb 2012 20:54:12 +0000 (20:54 +0000)
committerStephen Walker <stephendwalker@gmail.com>
Sun, 26 Feb 2012 20:54:12 +0000 (20:54 +0000)
SVN-Revision: 30734

libs/libtorrent/patches/000-upstream-gcc46-fixes.patch [new file with mode: 0644]
libs/libtorrent/patches/100-fix_cross_compile.patch
libs/libtorrent/patches/120-fix-ipv6_socket_datagram.patch

diff --git a/libs/libtorrent/patches/000-upstream-gcc46-fixes.patch b/libs/libtorrent/patches/000-upstream-gcc46-fixes.patch
new file mode 100644 (file)
index 0000000..d8bea4f
--- /dev/null
@@ -0,0 +1,31 @@
+--- a/src/data/memory_chunk.cc
++++ b/src/data/memory_chunk.cc
+@@ -71,7 +71,7 @@ MemoryChunk::MemoryChunk(char* ptr, char
+   if (page_align() >= m_pagesize)
+     throw internal_error("MemoryChunk::MemoryChunk(...) received an page alignment >= page size");
+-  if ((ptrdiff_t)ptr % m_pagesize)
++  if ((std::ptrdiff_t)ptr % m_pagesize)
+     throw internal_error("MemoryChunk::MemoryChunk(...) is not aligned to a page");
+ }
+--- a/src/torrent/data/block.h
++++ b/src/torrent/data/block.h
+@@ -40,6 +40,7 @@
+ #include <vector>
+ #include <torrent/common.h>
+ #include <torrent/data/block_transfer.h>
++#include <cstdlib>
+ namespace torrent {
+--- a/src/torrent/data/block_transfer.h
++++ b/src/torrent/data/block_transfer.h
+@@ -39,6 +39,7 @@
+ #include <torrent/common.h>
+ #include <torrent/data/piece.h>
++#include <cstdlib>
+ namespace torrent {
index 0fcae281679fbc0523fbfa158739ca960f057448..7030718488b2c91dfb195cc7663a1148c8bbb14a 100644 (file)
@@ -1,7 +1,5 @@
-Index: libtorrent-0.12.6/scripts/checks.m4
-===================================================================
---- libtorrent-0.12.6.orig/scripts/checks.m4
-+++ libtorrent-0.12.6/scripts/checks.m4
+--- a/scripts/checks.m4
++++ b/scripts/checks.m4
 @@ -96,7 +96,7 @@ AC_DEFUN([TORRENT_CHECK_KQUEUE], [
  AC_DEFUN([TORRENT_CHECK_KQUEUE_SOCKET_ONLY], [
    AC_MSG_CHECKING(whether kqueue supports pipes and ptys)
@@ -11,10 +9,8 @@ Index: libtorrent-0.12.6/scripts/checks.m4
      [[#include <fcntl.h>
        #include <stdlib.h>
        #include <unistd.h>
-Index: libtorrent-0.12.6/scripts/common.m4
-===================================================================
---- libtorrent-0.12.6.orig/scripts/common.m4
-+++ libtorrent-0.12.6/scripts/common.m4
+--- a/scripts/common.m4
++++ b/scripts/common.m4
 @@ -184,7 +184,7 @@ AC_DEFUN([TORRENT_CHECK_MADVISE], [
  AC_DEFUN([TORRENT_CHECK_EXECINFO], [
    AC_MSG_CHECKING(for execinfo.h)
index cf64be7fe2f3077339126679401dbc93e8a612bb..1a4662703fc2f1a780617f9479372b3aa12c961d 100644 (file)
@@ -1,7 +1,5 @@
-Index: libtorrent-0.12.6/src/net/socket_datagram.cc
-===================================================================
---- libtorrent-0.12.6.orig/src/net/socket_datagram.cc
-+++ libtorrent-0.12.6/src/net/socket_datagram.cc
+--- a/src/net/socket_datagram.cc
++++ b/src/net/socket_datagram.cc
 @@ -73,6 +73,23 @@ SocketDatagram::write_datagram(const voi
    int r;