[packages] libtorrent: fix GCC 4.6 bustage
git-svn-id: svn://svn.openwrt.org/openwrt/packages@30734 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
8a16f880f2
commit
2c27787e08
31
libs/libtorrent/patches/000-upstream-gcc46-fixes.patch
Normal file
31
libs/libtorrent/patches/000-upstream-gcc46-fixes.patch
Normal file
@ -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 {
|
||||||
|
|
@ -1,7 +1,5 @@
|
|||||||
Index: libtorrent-0.12.6/scripts/checks.m4
|
--- a/scripts/checks.m4
|
||||||
===================================================================
|
+++ b/scripts/checks.m4
|
||||||
--- libtorrent-0.12.6.orig/scripts/checks.m4
|
|
||||||
+++ libtorrent-0.12.6/scripts/checks.m4
|
|
||||||
@@ -96,7 +96,7 @@ AC_DEFUN([TORRENT_CHECK_KQUEUE], [
|
@@ -96,7 +96,7 @@ AC_DEFUN([TORRENT_CHECK_KQUEUE], [
|
||||||
AC_DEFUN([TORRENT_CHECK_KQUEUE_SOCKET_ONLY], [
|
AC_DEFUN([TORRENT_CHECK_KQUEUE_SOCKET_ONLY], [
|
||||||
AC_MSG_CHECKING(whether kqueue supports pipes and ptys)
|
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 <fcntl.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
Index: libtorrent-0.12.6/scripts/common.m4
|
--- a/scripts/common.m4
|
||||||
===================================================================
|
+++ b/scripts/common.m4
|
||||||
--- libtorrent-0.12.6.orig/scripts/common.m4
|
|
||||||
+++ libtorrent-0.12.6/scripts/common.m4
|
|
||||||
@@ -184,7 +184,7 @@ AC_DEFUN([TORRENT_CHECK_MADVISE], [
|
@@ -184,7 +184,7 @@ AC_DEFUN([TORRENT_CHECK_MADVISE], [
|
||||||
AC_DEFUN([TORRENT_CHECK_EXECINFO], [
|
AC_DEFUN([TORRENT_CHECK_EXECINFO], [
|
||||||
AC_MSG_CHECKING(for execinfo.h)
|
AC_MSG_CHECKING(for execinfo.h)
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
Index: libtorrent-0.12.6/src/net/socket_datagram.cc
|
--- a/src/net/socket_datagram.cc
|
||||||
===================================================================
|
+++ b/src/net/socket_datagram.cc
|
||||||
--- libtorrent-0.12.6.orig/src/net/socket_datagram.cc
|
|
||||||
+++ libtorrent-0.12.6/src/net/socket_datagram.cc
|
|
||||||
@@ -73,6 +73,23 @@ SocketDatagram::write_datagram(const voi
|
@@ -73,6 +73,23 @@ SocketDatagram::write_datagram(const voi
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user