From 95769f3901da993a0354dbd5589a11acb36ed334 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 13 Nov 2011 05:04:05 +0000 Subject: [PATCH] fix windows build --- include/libtorrent/bloom_filter.hpp | 2 +- include/libtorrent/config.hpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/libtorrent/bloom_filter.hpp b/include/libtorrent/bloom_filter.hpp index 7be6c49a0..29051b0ef 100644 --- a/include/libtorrent/bloom_filter.hpp +++ b/include/libtorrent/bloom_filter.hpp @@ -66,7 +66,7 @@ namespace libtorrent { const int c = (std::min)(count_zero_bits(bits, N), (N * 8) - 1); const int m = N * 8; - return log(c / float(m)) / (2.f * log(1.f - 1.f/m)); + return ::log(c / float(m)) / (2.f * log(1.f - 1.f/m)); } bloom_filter() { clear(); } diff --git a/include/libtorrent/config.hpp b/include/libtorrent/config.hpp index adb0cfe1e..f81476731 100644 --- a/include/libtorrent/config.hpp +++ b/include/libtorrent/config.hpp @@ -101,6 +101,7 @@ POSSIBILITY OF SUCH DAMAGE. #pragma warning(disable:4996) // 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup #pragma warning(disable: 4996) +#define strdup _strdup # if defined(TORRENT_BUILDING_SHARED) # define TORRENT_EXPORT __declspec(dllexport)