diff --git a/src/disk_io_thread.cpp b/src/disk_io_thread.cpp index 8e6ee06d7..8409ab677 100644 --- a/src/disk_io_thread.cpp +++ b/src/disk_io_thread.cpp @@ -43,7 +43,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/time.hpp" #endif -#ifndef TORRENT_DISABLE_MLOCK +#if !defined TORRENT_DISABLE_MLOCK && !defined TORRENT_WINDOWS #include #endif @@ -819,7 +819,7 @@ namespace libtorrent for (int i = 0; i < blocks_in_piece; ++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; } h = ctx.final();