forked from premiere/premiere-libtorrent
Merge pull request #35 from jpetso/master
Minor fixes to avoid warnings
This commit is contained in:
commit
5201fe952b
|
@ -312,18 +312,15 @@ if (MSVC)
|
|||
|
||||
#$(SolutionDir)<toolset>msvc,<variant>release:<linkflags>/OPT:ICF=5
|
||||
#$(SolutionDir)<toolset>msvc,<variant>release:<linkflags>/OPT:REF
|
||||
else()
|
||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
add_definitions(-Wno-c++11-extensions)
|
||||
add_definitions(-fcolor-diagnostics)
|
||||
endif()
|
||||
|
||||
add_definitions(-D_FILE_OFFSET_BITS=64)
|
||||
add_definitions(-DBOOST_EXCEPTION_DISABLE)
|
||||
add_definitions(-DBOOST_ASIO_ENABLE_CANCELIO)
|
||||
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
add_definitions(-fcolor-diagnostics)
|
||||
endif()
|
||||
|
||||
if (tcmalloc)
|
||||
target_link_libraries(torrent-rasterbar tcmalloc)
|
||||
endif()
|
||||
|
|
|
@ -1807,7 +1807,7 @@ namespace libtorrent {
|
|||
char ih_hex[41];
|
||||
to_hex((const char*)&info_hash[0], 20, ih_hex);
|
||||
char msg[200];
|
||||
snprintf(msg, sizeof(msg), "incoming dht get_peers reply: %s, peers %ld", ih_hex, m_num_peers);
|
||||
snprintf(msg, sizeof(msg), "incoming dht get_peers reply: %s, peers %d", ih_hex, m_num_peers);
|
||||
return msg;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
// only define BOOST_ASIO_DECL if it hasn't already been defined
|
||||
// or if it has been defined to an empty string
|
||||
#if TORRENT_HAS_ASIO_DECL == x
|
||||
#undef BOOST_ASIO_DECL
|
||||
#define BOOST_ASIO_DECL BOOST_SYMBOL_EXPORT
|
||||
#endif
|
||||
|
||||
|
|
|
@ -278,7 +278,10 @@ done:
|
|||
}
|
||||
}
|
||||
# else
|
||||
# define _BSD_SOURCE
|
||||
# undef _BSD_SOURCE
|
||||
# define _BSD_SOURCE // deprecated since glibc 2.20
|
||||
# undef _DEFAULT_SOURCE
|
||||
# define _DEFAULT_SOURCE
|
||||
# include <sys/uio.h>
|
||||
# endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue