From 9061a8a6d83706ce95face67af63757f15b95b1c Mon Sep 17 00:00:00 2001 From: flz Date: Thu, 9 Jun 2011 14:38:15 +0000 Subject: Add local patch to fix rtorrent's spinlock implementation. Submitted by: kan --- net-p2p/rtorrent-devel/Makefile | 2 +- net-p2p/rtorrent-devel/files/patch-src_thread_base.cc | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 net-p2p/rtorrent-devel/files/patch-src_thread_base.cc (limited to 'net-p2p/rtorrent-devel') 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); } -- cgit