diff --git a/libtorrent/src/Makefile.am b/libtorrent/src/Makefile.am index bc4fb7353..ede56a893 100644 --- a/libtorrent/src/Makefile.am +++ b/libtorrent/src/Makefile.am @@ -13,6 +13,7 @@ kademlia/traversal_algorithm.cpp endif libtorrent_la_SOURCES = entry.cpp escape_string.cpp \ +enum_net.cpp broadcast_socket.cpp \ peer_connection.cpp bt_peer_connection.cpp web_peer_connection.cpp \ natpmp.cpp piece_picker.cpp policy.cpp session.cpp session_impl.cpp sha1.cpp \ stat.cpp storage.cpp torrent.cpp torrent_handle.cpp pe_crypto.cpp \ @@ -30,11 +31,13 @@ $(top_srcdir)/include/libtorrent/alert_types.hpp \ $(top_srcdir)/include/libtorrent/aux_/session_impl.hpp \ $(top_srcdir)/include/libtorrent/bandwidth_manager.hpp \ $(top_srcdir)/include/libtorrent/bencode.hpp \ +$(top_srcdir)/include/libtorrent/broadcast_socket.hpp \ $(top_srcdir)/include/libtorrent/buffer.hpp \ $(top_srcdir)/include/libtorrent/connection_queue.hpp \ $(top_srcdir)/include/libtorrent/debug.hpp \ $(top_srcdir)/include/libtorrent/disk_io_thread.hpp \ $(top_srcdir)/include/libtorrent/entry.hpp \ +$(top_srcdir)/include/libtorrent/enum_net.hpp \ $(top_srcdir)/include/libtorrent/escape_string.hpp \ $(top_srcdir)/include/libtorrent/extensions.hpp \ $(top_srcdir)/include/libtorrent/extensions/metadata_transfer.hpp \ @@ -94,3 +97,4 @@ libtorrent_la_LIBADD = @ZLIB@ -l@BOOST_DATE_TIME_LIB@ -l@BOOST_FILESYSTEM_LIB@ - AM_CXXFLAGS= -ftemplate-depth-50 -I$(top_srcdir)/include -I$(top_srcdir)/include/libtorrent @ZLIBINCL@ @DEBUGFLAGS@ @PTHREAD_CFLAGS@ -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION AM_LDFLAGS= $(LDFLAGS) -l@BOOST_DATE_TIME_LIB@ -l@BOOST_FILESYSTEM_LIB@ -l@BOOST_THREAD_LIB@ @PTHREAD_LIBS@ + diff --git a/libtorrent/src/session_impl.cpp b/libtorrent/src/session_impl.cpp index c0c129e79..102bcf6cd 100755 --- a/libtorrent/src/session_impl.cpp +++ b/libtorrent/src/session_impl.cpp @@ -666,7 +666,8 @@ namespace detail try { // create listener socket - m_listen_socket = boost::shared_ptr(new socket_acceptor(m_io_service)); + m_listen_socket.reset(new socket_acceptor(m_io_service)); + m_listen_socket->set_option(socket_acceptor::reuse_address(true)); for(;;) { @@ -1341,6 +1342,9 @@ namespace detail } } + // close listen socket + m_listen_socket.reset(); + ptime start(time_now()); l.unlock(); diff --git a/libtorrent/src/storage.cpp b/libtorrent/src/storage.cpp index 1cce6ad81..8c162ea93 100755 --- a/libtorrent/src/storage.cpp +++ b/libtorrent/src/storage.cpp @@ -88,6 +88,12 @@ POSSIBILITY OF SUCH DAMAGE. #include #endif +#if defined(__FreeBSD__) +// for statfs() +#include +#include +#endif + #if defined(_WIN32) && defined(UNICODE) #include @@ -2199,3 +2205,4 @@ namespace libtorrent #endif } // namespace libtorrent +