packages/libs/libtorrent/patches/000-upstream-gcc46-fixes.patch
swalker 2c27787e08 [packages] libtorrent: fix GCC 4.6 bustage
git-svn-id: svn://svn.openwrt.org/openwrt/packages@30734 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-02-26 20:54:12 +00:00

32 lines
847 B
Diff

--- 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 {