packages/libs/libtorrent/patches/000-upstream-gcc46-fixes.patch

32 lines
847 B
Diff
Raw Normal View History

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