diff --git a/src/core/poll_manager.cc b/src/core/poll_manager.cc index e9f64afc..1023b0f1 100644 --- a/src/core/poll_manager.cc +++ b/src/core/poll_manager.cc @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include #include @@ -85,7 +85,7 @@ create_poll() { log->push_front("Using 'select' based polling."); else - throw std::runtime_error("Could not create any Poll object."); + throw torrent::internal_error("Could not create any Poll object."); return poll; } diff --git a/src/core/poll_manager.h b/src/core/poll_manager.h index cfd40fc6..bdbf5a0e 100644 --- a/src/core/poll_manager.h +++ b/src/core/poll_manager.h @@ -37,12 +37,12 @@ #ifndef RTORRENT_CORE_POLL_MANAGER_H #define RTORRENT_CORE_POLL_MANAGER_H -#include -#include -#include - #include "curl_stack.h" +namespace torrent { +class Poll; +} + namespace core { torrent::Poll* create_poll(); diff --git a/src/main.cc b/src/main.cc index 5dfdc987..6c85dc44 100644 --- a/src/main.cc +++ b/src/main.cc @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -195,6 +196,7 @@ main(int argc, char** argv) { // to process new non-socket events. SignalHandler::set_handler(SIGUSR1, sigc::ptr_fun(&do_nothing)); + torrent::Poll::slot_create_poll() = std::tr1::bind(&core::create_poll); torrent::initialize(main_thread->poll()); // Initialize option handlers after libtorrent to ensure diff --git a/src/thread_main.cc b/src/thread_main.cc index 47ffa25f..09c78989 100644 --- a/src/thread_main.cc +++ b/src/thread_main.cc @@ -40,6 +40,7 @@ #include "globals.h" #include +#include ThreadMain::~ThreadMain() { }