fixed windows build
This commit is contained in:
@@ -43,7 +43,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "libtorrent/time.hpp"
|
#include "libtorrent/time.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TORRENT_DISABLE_MLOCK
|
#if !defined TORRENT_DISABLE_MLOCK && !defined TORRENT_WINDOWS
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -819,7 +819,7 @@ namespace libtorrent
|
|||||||
for (int i = 0; i < blocks_in_piece; ++i)
|
for (int i = 0; i < blocks_in_piece; ++i)
|
||||||
{
|
{
|
||||||
TORRENT_ASSERT(p->blocks[i]);
|
TORRENT_ASSERT(p->blocks[i]);
|
||||||
ctx.update((char const*)p->blocks[i], std::min(piece_size, m_block_size));
|
ctx.update((char const*)p->blocks[i], (std::min)(piece_size, m_block_size));
|
||||||
piece_size -= m_block_size;
|
piece_size -= m_block_size;
|
||||||
}
|
}
|
||||||
h = ctx.final();
|
h = ctx.final();
|
||||||
|
Reference in New Issue
Block a user