[packages] libtorrent: fix GCC 4.6 bustage
[openwrt/svn-archive/archive.git] / libs / libtorrent / patches / 000-upstream-gcc46-fixes.patch
1 --- a/src/data/memory_chunk.cc
2 +++ b/src/data/memory_chunk.cc
3 @@ -71,7 +71,7 @@ MemoryChunk::MemoryChunk(char* ptr, char
4 if (page_align() >= m_pagesize)
5 throw internal_error("MemoryChunk::MemoryChunk(...) received an page alignment >= page size");
6
7 - if ((ptrdiff_t)ptr % m_pagesize)
8 + if ((std::ptrdiff_t)ptr % m_pagesize)
9 throw internal_error("MemoryChunk::MemoryChunk(...) is not aligned to a page");
10 }
11
12 --- a/src/torrent/data/block.h
13 +++ b/src/torrent/data/block.h
14 @@ -40,6 +40,7 @@
15 #include <vector>
16 #include <torrent/common.h>
17 #include <torrent/data/block_transfer.h>
18 +#include <cstdlib>
19
20 namespace torrent {
21
22 --- a/src/torrent/data/block_transfer.h
23 +++ b/src/torrent/data/block_transfer.h
24 @@ -39,6 +39,7 @@
25
26 #include <torrent/common.h>
27 #include <torrent/data/piece.h>
28 +#include <cstdlib>
29
30 namespace torrent {
31