diff --git a/include/libtorrent/aux_/session_impl.hpp b/include/libtorrent/aux_/session_impl.hpp index 471c6c421..230720750 100644 --- a/include/libtorrent/aux_/session_impl.hpp +++ b/include/libtorrent/aux_/session_impl.hpp @@ -188,8 +188,8 @@ namespace libtorrent #ifdef TORRENT_DEBUG bool is_network_thread() const { - if (m_network_thread == 0) return true; #if defined BOOST_HAS_PTHREADS + if (m_network_thread == 0) return true; return m_network_thread == pthread_self(); #endif return true; diff --git a/src/file.cpp b/src/file.cpp index 49890e61f..964036ca1 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -1067,7 +1067,7 @@ namespace libtorrent { for (int k = 0; k < int(i->iov_len); k += m_page_size) { - cur_seg->Buffer = PtrToPtr64(((char*)i->iov_base) + k); + cur_seg->Buffer = PtrToPtr64((((char*)i->iov_base) + k)); ++cur_seg; } } @@ -1250,7 +1250,7 @@ namespace libtorrent { for (int k = 0; k < int(i->iov_len); k += m_page_size) { - cur_seg->Buffer = PtrToPtr64(((char*)i->iov_base) + k); + cur_seg->Buffer = PtrToPtr64((((char*)i->iov_base) + k)); ++cur_seg; } }