From fea3bf2cedc472fd9a61a64e65758cb0a0756661 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 18 Apr 2010 02:50:22 +0000 Subject: [PATCH] fixed build issue on windows related to GetCompressedSize() --- ChangeLog | 1 + src/file.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ebd20753f..62433647b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -28,6 +28,7 @@ incoming connection * added more detailed instrumentation of the disk I/O thread + * fixed build issue on windows related to GetCompressedSize() * fixed deadlock when starting torrents with certain invalid tracker URLs * fixed iterator bug in disk I/O thread * fixed FIEMAP support on linux diff --git a/src/file.cpp b/src/file.cpp index 13c7f4f8a..5be33bcc0 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -1500,7 +1500,9 @@ namespace libtorrent { // only allocate the space if the file // is not fully allocated - offs.LowPart = GetCompressedFileSize(m_path.c_str(), &offs.HighPart); + DWORD high_dword = 0; + offs.LowPart = GetCompressedFileSize(m_path.c_str(), &high_dword); + offs.HighPart = high_dword; ec.assign(GetLastError(), get_system_category()); if (ec) return false; if (offs.QuadPart != s)