diff options
author | flz <flz@FreeBSD.org> | 2011-06-09 22:38:15 +0800 |
---|---|---|
committer | flz <flz@FreeBSD.org> | 2011-06-09 22:38:15 +0800 |
commit | 9061a8a6d83706ce95face67af63757f15b95b1c (patch) | |
tree | f9ad98e238b68b9a404e6b360843dddd3ae02394 /net-p2p | |
parent | d21c7e83134d90cf3ada123575f21582b480f35b (diff) | |
download | freebsd-ports-gnome-9061a8a6d83706ce95face67af63757f15b95b1c.tar.gz freebsd-ports-gnome-9061a8a6d83706ce95face67af63757f15b95b1c.tar.zst freebsd-ports-gnome-9061a8a6d83706ce95face67af63757f15b95b1c.zip |
Add local patch to fix rtorrent's spinlock implementation.
Submitted by: kan
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); } |