forked from premiere/premiere-libtorrent
fix linux python build and test_ssl build
This commit is contained in:
parent
8cc9339550
commit
d019f3d4c3
6
Jamfile
6
Jamfile
|
@ -136,7 +136,7 @@ rule linking ( properties * )
|
||||||
}
|
}
|
||||||
|
|
||||||
# clock_gettime on linux requires librt
|
# clock_gettime on linux requires librt
|
||||||
if <need-librt>yes in $(properties)
|
if <target-os>linux in $(properties)
|
||||||
{
|
{
|
||||||
result += <library>librt ;
|
result += <library>librt ;
|
||||||
}
|
}
|
||||||
|
@ -324,8 +324,6 @@ feature.compose <sanitize>address : <cflags>-fsanitize=address <linkflags>-fsani
|
||||||
# RTC (runtime check) is an msvc feature
|
# RTC (runtime check) is an msvc feature
|
||||||
feature.compose <sanitize>rtc : <cflags>/RTCc <cflags>/RTCsu ;
|
feature.compose <sanitize>rtc : <cflags>/RTCc <cflags>/RTCsu ;
|
||||||
|
|
||||||
feature need-librt : no yes : composite propagated link-incompatible ;
|
|
||||||
|
|
||||||
feature fiemap : off on : composite propagated ;
|
feature fiemap : off on : composite propagated ;
|
||||||
feature.compose <fiemap>on : <define>HAVE_LINUX_FIEMAP_H ;
|
feature.compose <fiemap>on : <define>HAVE_LINUX_FIEMAP_H ;
|
||||||
|
|
||||||
|
@ -503,7 +501,7 @@ lib boost_random : : <name>boost_random ;
|
||||||
# openssl on linux/bsd/macos etc.
|
# openssl on linux/bsd/macos etc.
|
||||||
lib gcrypt : : <name>gcrypt <link>shared <search>/opt/local/lib ;
|
lib gcrypt : : <name>gcrypt <link>shared <search>/opt/local/lib ;
|
||||||
lib z : : <link>shared <name>z <search>/usr/lib ;
|
lib z : : <link>shared <name>z <search>/usr/lib ;
|
||||||
lib crypto : : <name>crypto <search>/usr/lib <use>z ;
|
lib crypto : : <name>crypto <link>shared <search>/usr/lib <use>z ;
|
||||||
lib ssl : : <name>ssl <link>shared <use>crypto <search>/opt/local/lib ;
|
lib ssl : : <name>ssl <link>shared <use>crypto <search>/opt/local/lib ;
|
||||||
lib dl : : <link>shared <name>dl ;
|
lib dl : : <link>shared <name>dl ;
|
||||||
lib aio : : <link>shared <name>aio ;
|
lib aio : : <link>shared <name>aio ;
|
||||||
|
|
|
@ -39,8 +39,19 @@ rule libtorrent_linking ( properties * )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if <link>static in $(properties)
|
||||||
|
{
|
||||||
|
ECHO "WARNING: you probably want to specify libtorrent-link=static rather than link=static" ;
|
||||||
|
}
|
||||||
|
|
||||||
if <boost>source in $(properties)
|
if <boost>source in $(properties)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if <boost-link>static in $(properties) && <target-os>linux
|
||||||
|
{
|
||||||
|
ECHO "WARNING: you cannot link statically against boost-python on linux, because it links against pthread statically in that case, which is not allowed" ;
|
||||||
|
}
|
||||||
|
|
||||||
# linux must link dynamically against boost python because it pulls
|
# linux must link dynamically against boost python because it pulls
|
||||||
# in libpthread, which must be linked dynamically since we're building a .so
|
# in libpthread, which must be linked dynamically since we're building a .so
|
||||||
# (the static build of libpthread is not position independent)
|
# (the static build of libpthread is not position independent)
|
||||||
|
@ -130,5 +141,6 @@ my-python-extension libtorrent
|
||||||
<suppress-import-lib>false
|
<suppress-import-lib>false
|
||||||
;
|
;
|
||||||
|
|
||||||
install stage_module : libtorrent : <location>. ;
|
install stage_module : libtorrent : <install-type>LIB <install-dependencies>on <location>. ;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -88,14 +88,14 @@ int ssl_peer_disconnects = 0;
|
||||||
|
|
||||||
bool on_alert(alert const* a)
|
bool on_alert(alert const* a)
|
||||||
{
|
{
|
||||||
if (peer_disconnected_alert* e = alert_cast<peer_disconnected_alert>(a))
|
if (peer_disconnected_alert const* e = alert_cast<peer_disconnected_alert>(a))
|
||||||
{
|
{
|
||||||
++peer_disconnects;
|
++peer_disconnects;
|
||||||
if (e->error.category() == boost::asio::error::get_ssl_category())
|
if (e->error.category() == boost::asio::error::get_ssl_category())
|
||||||
++ssl_peer_disconnects;
|
++ssl_peer_disconnects;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (peer_error_alert* e = alert_cast<peer_error_alert>(a))
|
if (peer_error_alert const* e = alert_cast<peer_error_alert>(a))
|
||||||
{
|
{
|
||||||
++peer_disconnects;
|
++peer_disconnects;
|
||||||
++peer_errors;
|
++peer_errors;
|
||||||
|
|
Loading…
Reference in New Issue