From 82707511635de59d29db53ac1916414ae390b032 Mon Sep 17 00:00:00 2001 From: arvidn Date: Sun, 20 Jan 2019 17:59:11 +0100 Subject: [PATCH 1/3] on linux, link against lbdl when using openssl --- Jamfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jamfile b/Jamfile index a64ffe019..2928add3d 100644 --- a/Jamfile +++ b/Jamfile @@ -806,6 +806,7 @@ lib torrent shared:BOOST_SYSTEM_SOURCE openssl:ssl openssl:crypto + openssl,linux:dl on:src/kademlia/$(KADEMLIA_SOURCES).cpp on:ed25519/src/$(ED25519_SOURCES).cpp From 71f275d92b7b0b2c33228ac47a48615dadba3da4 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 21 Jan 2019 16:48:19 +0100 Subject: [PATCH 2/3] replace use of (deprecated) boost.endian with boost.prefef --- ChangeLog | 2 ++ src/sha1.cpp | 8 ++++---- src/torrent_peer.cpp | 6 +++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8042bae65..fc9ff90e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,5 @@ + * replace use of boost-endian with boost-predef + 1.1.12 release * uTP performance fixes diff --git a/src/sha1.cpp b/src/sha1.cpp index 8085731b7..50a640fb0 100644 --- a/src/sha1.cpp +++ b/src/sha1.cpp @@ -15,7 +15,7 @@ changelog at the end of the file. #include "libtorrent/sha1.hpp" -#include // for BIG_ENDIAN and LITTLE_ENDIAN macros +#include typedef boost::uint32_t u32; typedef boost::uint8_t u8; @@ -164,7 +164,7 @@ namespace #endif } -#if !defined BOOST_BIG_ENDIAN && !defined BOOST_LITTLE_ENDIAN +#if !BOOST_ENDIAN_BIG_BYTE && !BOOST_ENDIAN_LITTLE_BYTE bool is_big_endian() { u32 test = 1; @@ -193,9 +193,9 @@ void SHA1_update(sha_ctx* context, u8 const* data, u32 len) { // GCC standard defines for endianness // test with: cpp -dM /dev/null -#if defined BOOST_BIG_ENDIAN +#if BOOST_ENDIAN_BIG_BYTE internal_update(context, data, len); -#elif defined BOOST_LITTLE_ENDIAN +#elif BOOST_ENDIAN_LITTLE_BYTE internal_update(context, data, len); #else // select different functions depending on endianess diff --git a/src/torrent_peer.cpp b/src/torrent_peer.cpp index 5388ef84a..6fb4aed30 100644 --- a/src/torrent_peer.cpp +++ b/src/torrent_peer.cpp @@ -37,7 +37,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/crc32c.hpp" #include "libtorrent/ip_voter.hpp" -#include // for BIG_ENDIAN and LITTLE_ENDIAN macros +#include namespace libtorrent { @@ -84,10 +84,10 @@ namespace libtorrent if (e1.port() > e2.port()) swap(e1, e2); boost::uint32_t p; -#if defined BOOST_BIG_ENDIAN +#if BOOST_ENDIAN_BIG_BYTE p = e1.port() << 16; p |= e2.port(); -#elif defined BOOST_LITTLE_ENDIAN +#elif BOOST_ENDIAN_LITTLE_BYTE p = aux::host_to_network(e2.port()) << 16; p |= aux::host_to_network(e1.port()); #else From 26ebc289ae192dec1cfa9b3dfe0a6889f6c30b0b Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 21 Jan 2019 16:48:19 +0100 Subject: [PATCH 3/3] remove unnecessary include of boost.endian header --- include/libtorrent/config.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/include/libtorrent/config.hpp b/include/libtorrent/config.hpp index 0fe4dce31..48b1b950a 100644 --- a/include/libtorrent/config.hpp +++ b/include/libtorrent/config.hpp @@ -50,7 +50,6 @@ POSSIBILITY OF SUCH DAMAGE. #include #include #include -#include #include // for snprintf #include // for IOV_MAX