From 2c27787e080ca7567c20ce3eb848fe0dcda40464 Mon Sep 17 00:00:00 2001 From: swalker Date: Sun, 26 Feb 2012 20:54:12 +0000 Subject: [PATCH] [packages] libtorrent: fix GCC 4.6 bustage git-svn-id: svn://svn.openwrt.org/openwrt/packages@30734 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../patches/000-upstream-gcc46-fixes.patch | 31 ++++++++++++++++++++++ .../libtorrent/patches/100-fix_cross_compile.patch | 12 +++------ .../patches/120-fix-ipv6_socket_datagram.patch | 6 ++--- 3 files changed, 37 insertions(+), 12 deletions(-) create mode 100644 libs/libtorrent/patches/000-upstream-gcc46-fixes.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 index 000000000..d8bea4f59 --- /dev/null +++ b/libs/libtorrent/patches/000-upstream-gcc46-fixes.patch @@ -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 + #include + #include ++#include + + namespace torrent { + +--- a/src/torrent/data/block_transfer.h ++++ b/src/torrent/data/block_transfer.h +@@ -39,6 +39,7 @@ + + #include + #include ++#include + + namespace torrent { + diff --git a/libs/libtorrent/patches/100-fix_cross_compile.patch b/libs/libtorrent/patches/100-fix_cross_compile.patch index 0fcae2816..703071848 100644 --- a/libs/libtorrent/patches/100-fix_cross_compile.patch +++ b/libs/libtorrent/patches/100-fix_cross_compile.patch @@ -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 #include #include -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) diff --git a/libs/libtorrent/patches/120-fix-ipv6_socket_datagram.patch b/libs/libtorrent/patches/120-fix-ipv6_socket_datagram.patch index cf64be7fe..1a4662703 100644 --- a/libs/libtorrent/patches/120-fix-ipv6_socket_datagram.patch +++ b/libs/libtorrent/patches/120-fix-ipv6_socket_datagram.patch @@ -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; -- 2.11.0