forked from premiere/premiere-libtorrent
fix file.cpp build on linux
This commit is contained in:
parent
e670f3807b
commit
78d3654263
|
@ -147,8 +147,8 @@ namespace libtorrent
|
||||||
#else
|
#else
|
||||||
int m_fd;
|
int m_fd;
|
||||||
#endif
|
#endif
|
||||||
#if defined TORRENT_WINDOWS || defined TORRENT_DEBUG
|
#if defined TORRENT_WINDOWS || defined TORRENT_LINUX || defined TORRENT_DEBUG
|
||||||
void init_file();
|
static void init_file();
|
||||||
static int m_page_size;
|
static int m_page_size;
|
||||||
#endif
|
#endif
|
||||||
int m_open_mode;
|
int m_open_mode;
|
||||||
|
|
|
@ -234,7 +234,7 @@ namespace libtorrent
|
||||||
// defined in storage.cpp
|
// defined in storage.cpp
|
||||||
int bufs_size(file::iovec_t const* bufs, int num_bufs);
|
int bufs_size(file::iovec_t const* bufs, int num_bufs);
|
||||||
|
|
||||||
#if defined TORRENT_WINDOWS || defined TORRENT_DEBUG
|
#if defined TORRENT_WINDOWS || defined TORRENT_LINUX || defined TORRENT_DEBUG
|
||||||
|
|
||||||
int file::m_page_size = 0;
|
int file::m_page_size = 0;
|
||||||
|
|
||||||
|
@ -260,7 +260,7 @@ namespace libtorrent
|
||||||
TORRENT_ASSERT(num_bufs > 0);
|
TORRENT_ASSERT(num_bufs > 0);
|
||||||
TORRENT_ASSERT(is_open());
|
TORRENT_ASSERT(is_open());
|
||||||
|
|
||||||
#if defined TORRENT_WINDOWS || defined TORRENT_DEBUG
|
#if defined TORRENT_WINDOWS || defined TORRENT_LINUX || defined TORRENT_DEBUG
|
||||||
// make sure m_page_size is initialized
|
// make sure m_page_size is initialized
|
||||||
init_file();
|
init_file();
|
||||||
#endif
|
#endif
|
||||||
|
@ -417,7 +417,7 @@ namespace libtorrent
|
||||||
TORRENT_ASSERT(num_bufs > 0);
|
TORRENT_ASSERT(num_bufs > 0);
|
||||||
TORRENT_ASSERT(is_open());
|
TORRENT_ASSERT(is_open());
|
||||||
|
|
||||||
#if defined TORRENT_WINDOWS || defined TORRENT_DEBUG
|
#if defined TORRENT_WINDOWS || defined TORRENT_LINUX || defined TORRENT_DEBUG
|
||||||
// make sure m_page_size is initialized
|
// make sure m_page_size is initialized
|
||||||
init_file();
|
init_file();
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue