From 066108ca45ee93db7ed92d2db37a139160c30d64 Mon Sep 17 00:00:00 2001 From: Sergei Reznikov Date: Thu, 13 Aug 2015 02:09:17 +0300 Subject: [PATCH] libtorrent_rasterbar: add patchset --- .../libtorrent_rasterbar_x86-1.0.6.patchset | 117 ++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 net-libs/libtorrent-rasterbar/patches/libtorrent_rasterbar_x86-1.0.6.patchset diff --git a/net-libs/libtorrent-rasterbar/patches/libtorrent_rasterbar_x86-1.0.6.patchset b/net-libs/libtorrent-rasterbar/patches/libtorrent_rasterbar_x86-1.0.6.patchset new file mode 100644 index 000000000..dca331880 --- /dev/null +++ b/net-libs/libtorrent-rasterbar/patches/libtorrent_rasterbar_x86-1.0.6.patchset @@ -0,0 +1,117 @@ +From 7258de8d1f9af649bc829b447c93e0f835602d0b Mon Sep 17 00:00:00 2001 +From: Sergei Reznikov +Date: Tue, 9 Jun 2015 08:26:30 +0300 +Subject: Replace BeOS support code with Haiku + + +diff --git a/include/libtorrent/config.hpp b/include/libtorrent/config.hpp +index 1f17426..c8f36f3 100644 +--- a/include/libtorrent/config.hpp ++++ b/include/libtorrent/config.hpp +@@ -245,14 +245,15 @@ POSSIBILITY OF SUCH DAMAGE. + #define TORRENT_USE_IFCONF 1 + #define TORRENT_HAS_SALEN 0 + +-// ==== BEOS === +-#elif defined __BEOS__ || defined __HAIKU__ +-#define TORRENT_BEOS +-#include // B_PATH_NAME_LENGTH ++// ==== Haiku === ++#elif defined __HAIKU__ ++#define TORRENT_HAIKU ++#include // B_PATH_NAME_LENGTH + #define TORRENT_HAS_FALLOCATE 0 + #define TORRENT_USE_MLOCK 0 + #ifndef TORRENT_USE_ICONV + #define TORRENT_USE_ICONV 0 ++#define TORRENT_USE_IFCONF 1 + #endif + + // ==== GNU/Hurd === +diff --git a/include/libtorrent/thread.hpp b/include/libtorrent/thread.hpp +index 70a2b85..9bc9ee3 100644 +--- a/include/libtorrent/thread.hpp ++++ b/include/libtorrent/thread.hpp +@@ -41,10 +41,6 @@ POSSIBILITY OF SUCH DAMAGE. + #include + #endif + +-#if defined TORRENT_BEOS +-#include +-#endif +- + #include // for auto_ptr required by asio + + #include +@@ -75,7 +71,6 @@ namespace libtorrent + HANDLE m_sem; + mutex m_mutex; + int m_num_waiters; +-#elif defined TORRENT_BEOS + sem_id m_sem; + mutex m_mutex; + int m_num_waiters; +diff --git a/src/allocator.cpp b/src/allocator.cpp +index 310cf0b..4cb2aa8 100644 +--- a/src/allocator.cpp ++++ b/src/allocator.cpp +@@ -42,7 +42,7 @@ POSSIBILITY OF SUCH DAMAGE. + #include // _SC_PAGESIZE + #endif + +-#if TORRENT_USE_MEMALIGN || TORRENT_USE_POSIX_MEMALIGN || defined TORRENT_WINDOWS ++#if TORRENT_USE_MEMALIGN || TORRENT_USE_POSIX_MEMALIGN || defined TORRENT_WINDOWS || defined TORRENT_HAIKU + #include // memalign and _aligned_malloc + #include // _aligned_malloc on mingw + #endif +diff --git a/src/enum_net.cpp b/src/enum_net.cpp +index 0994a63..a66d20b 100644 +--- a/src/enum_net.cpp ++++ b/src/enum_net.cpp +@@ -92,6 +92,10 @@ POSSIBILITY OF SUCH DAMAGE. + #define IF_NAMESIZE IFNAMSIZ + #endif + ++#if defined __HAIKU__ ++#include ++#endif ++ + namespace libtorrent { namespace + { + +diff --git a/src/thread.cpp b/src/thread.cpp +index c22aeb0..2490d20 100644 +--- a/src/thread.cpp ++++ b/src/thread.cpp +@@ -33,10 +33,6 @@ POSSIBILITY OF SUCH DAMAGE. + #include "libtorrent/thread.hpp" + #include "libtorrent/assert.hpp" + +-#ifdef TORRENT_BEOS +-#include +-#endif +- + #ifdef BOOST_HAS_PTHREADS + #include // for gettimeofday() + #include +@@ -48,8 +44,6 @@ namespace libtorrent + { + #if defined TORRENT_WINDOWS || defined TORRENT_CYGWIN + Sleep(milliseconds); +-#elif defined TORRENT_BEOS +- snooze_until(system_time() + boost::int64_t(milliseconds) * 1000, B_SYSTEM_TIMEBASE); + #else + usleep(milliseconds * 1000); + #endif +@@ -129,7 +123,7 @@ namespace libtorrent + { + ReleaseSemaphore(m_sem, m_num_waiters, 0); + } +-#elif defined TORRENT_BEOS ++#elif defined TORRENT_HAIKU + condition_variable::condition_variable() + : m_num_waiters(0) + { +-- +2.2.2 +