diff options
author | Florent Thoumie <flz@FreeBSD.org> | 2011-06-09 14:38:15 +0000 |
---|---|---|
committer | Florent Thoumie <flz@FreeBSD.org> | 2011-06-09 14:38:15 +0000 |
commit | 09d53e77d5674356308fa9320ccc46583f568a5b (patch) | |
tree | a4d23821695c67a3a76694508a55b9048724b616 /net-p2p | |
parent | Update to 2.9.0.1 (diff) |
Add local patch to fix rtorrent's spinlock implementation.
Submitted by: kan
Notes
Notes:
svn path=/head/; revision=275277
Diffstat (limited to 'net-p2p')
-rw-r--r-- | net-p2p/rtorrent-devel/Makefile | 2 | ||||
-rw-r--r-- | net-p2p/rtorrent-devel/files/patch-src_thread_base.cc | 11 | ||||
-rw-r--r-- | net-p2p/rtorrent/Makefile | 2 | ||||
-rw-r--r-- | net-p2p/rtorrent/files/patch-src_thread_base.cc | 11 |
4 files changed, 24 insertions, 2 deletions
diff --git a/net-p2p/rtorrent-devel/Makefile b/net-p2p/rtorrent-devel/Makefile index fd72ee3ad50b..877c43fa529b 100644 --- a/net-p2p/rtorrent-devel/Makefile +++ b/net-p2p/rtorrent-devel/Makefile @@ -7,7 +7,7 @@ PORTNAME= rtorrent-devel PORTVERSION= 0.8.8 -PORTREVISION= 0 +PORTREVISION= 1 DISTNAME= ${PORTNAME:S/-devel//}-${PORTVERSION} MAINTAINER= flz@FreeBSD.org diff --git a/net-p2p/rtorrent-devel/files/patch-src_thread_base.cc b/net-p2p/rtorrent-devel/files/patch-src_thread_base.cc new file mode 100644 index 000000000000..1119ac82fe18 --- /dev/null +++ b/net-p2p/rtorrent-devel/files/patch-src_thread_base.cc @@ -0,0 +1,11 @@ +--- src/thread_base.cc.orig 2011-06-07 12:06:49.729114328 -0400 ++++ src/thread_base.cc 2011-06-07 12:07:19.880080780 -0400 +@@ -61,7 +61,7 @@ + + static const unsigned int max_size = 32; + +- thread_queue_hack() { std::memset(m_queue, 0, sizeof(thread_queue_hack)); } ++ thread_queue_hack() : m_lock(0) { std::memset(m_queue, 0, sizeof(thread_queue_hack)); } + + void lock() { while (!__sync_bool_compare_and_swap(&m_lock, 0, 1)) usleep(0); } + void unlock() { __sync_bool_compare_and_swap(&m_lock, 1, 0); } diff --git a/net-p2p/rtorrent/Makefile b/net-p2p/rtorrent/Makefile index eea6a94c8117..9f3d6e11fb78 100644 --- a/net-p2p/rtorrent/Makefile +++ b/net-p2p/rtorrent/Makefile @@ -7,7 +7,7 @@ PORTNAME?= rtorrent PORTVERSION?= 0.8.7 -PORTREVISION?= 1 +PORTREVISION?= 2 CATEGORIES= net-p2p MASTER_SITES= http://libtorrent.rakshasa.no/downloads/ \ ${MASTER_SITE_LOCAL} diff --git a/net-p2p/rtorrent/files/patch-src_thread_base.cc b/net-p2p/rtorrent/files/patch-src_thread_base.cc new file mode 100644 index 000000000000..1119ac82fe18 --- /dev/null +++ b/net-p2p/rtorrent/files/patch-src_thread_base.cc @@ -0,0 +1,11 @@ +--- src/thread_base.cc.orig 2011-06-07 12:06:49.729114328 -0400 ++++ src/thread_base.cc 2011-06-07 12:07:19.880080780 -0400 +@@ -61,7 +61,7 @@ + + static const unsigned int max_size = 32; + +- thread_queue_hack() { std::memset(m_queue, 0, sizeof(thread_queue_hack)); } ++ thread_queue_hack() : m_lock(0) { std::memset(m_queue, 0, sizeof(thread_queue_hack)); } + + void lock() { while (!__sync_bool_compare_and_swap(&m_lock, 0, 1)) usleep(0); } + void unlock() { __sync_bool_compare_and_swap(&m_lock, 1, 0); } |