From 7508038337d1c5394bd27abe0bfc3b10de5a8260 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 14 Feb 2011 04:12:26 +0000 Subject: [PATCH] cross compiling fixes --- Jamfile | 4 ++-- include/libtorrent/bt_peer_connection.hpp | 2 +- src/allocator.cpp | 2 +- src/enum_net.cpp | 2 +- src/file.cpp | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Jamfile b/Jamfile index b0e34a217..6f6adeebe 100755 --- a/Jamfile +++ b/Jamfile @@ -56,7 +56,7 @@ rule linking ( properties * ) if linux in $(properties) { # linker library on linux, required when using openssl -# result += dl ; + result += dl ; } } @@ -356,7 +356,7 @@ lib gcrypt : : gcrypt shared /opt/local/lib ; lib z : : shared z /lib ; lib crypto : : crypto /lib z ; lib ssl : : ssl shared crypto ; -lib dl : : shared /libdl.so /lib ; +lib dl : : shared dl ; # time functions used on linux require librt lib librt : : rt shared ; diff --git a/include/libtorrent/bt_peer_connection.hpp b/include/libtorrent/bt_peer_connection.hpp index e4617696b..12d924acb 100644 --- a/include/libtorrent/bt_peer_connection.hpp +++ b/include/libtorrent/bt_peer_connection.hpp @@ -204,7 +204,7 @@ namespace libtorrent void on_have_none(int received); void on_reject_request(int received); void on_allowed_fast(int received); -#ifndef TORRENT_DISABLE_ENCRYPTION +#ifndef TORRENT_DISABLE_EXTENSIONS void on_holepunch(); #endif diff --git a/src/allocator.cpp b/src/allocator.cpp index aaeca05ad..cdf7bd1c0 100644 --- a/src/allocator.cpp +++ b/src/allocator.cpp @@ -35,7 +35,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/assert.hpp" #ifdef TORRENT_WINDOWS -#include +#include #elif defined TORRENT_BEOS #include #include // malloc/free diff --git a/src/enum_net.cpp b/src/enum_net.cpp index 997bcea79..13adbcac7 100644 --- a/src/enum_net.cpp +++ b/src/enum_net.cpp @@ -107,7 +107,7 @@ namespace libtorrent { namespace int sockaddr_len(sockaddr const* sin) { -#if defined TORRENT_WINDOWS || TORRENT_MINGW || defined TORRENT_LINUX +#if defined TORRENT_WINDOWS || defined TORRENT_MINGW || defined TORRENT_LINUX return sin->sa_family == AF_INET ? sizeof(sockaddr_in) : sizeof(sockaddr_in6); #else return sin->sa_len; diff --git a/src/file.cpp b/src/file.cpp index 8f1c4d304..9ebbe12df 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -98,7 +98,7 @@ static int my_fallocate(int fd, int mode, loff_t offset, loff_t len) #endif } -#elif defined __APPLE__ && defined __MACH__ +#elif defined __APPLE__ && defined __MACH__ && MAC_OS_X_VERSION_MIN_REQUIRED >= 1050 // mac specifics #include