commit:     2dfef62156839f0e9bb959ae441ddf090d5fc980
Author:     Andrew Savchenko <bircoph <AT> gmail <DOT> com>
AuthorDate: Fri Jan  9 03:16:43 2015 +0000
Commit:     Andrew Savchenko <bircoph <AT> gmail <DOT> com>
CommitDate: Fri Jan  9 03:16:43 2015 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=dev/bircoph.git;a=commit;h=2dfef621

tsocks: fix bug 316345

Fix support for applications usin poll()

---
 net-proxy/tsocks/files/tsocks-1.8_beta5-poll.patch | 16 ++++++++++++++++
 net-proxy/tsocks/tsocks-1.8_beta5-r7.ebuild        |  3 ++-
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/net-proxy/tsocks/files/tsocks-1.8_beta5-poll.patch 
b/net-proxy/tsocks/files/tsocks-1.8_beta5-poll.patch
new file mode 100644
index 0000000..2335395
--- /dev/null
+++ b/net-proxy/tsocks/files/tsocks-1.8_beta5-poll.patch
@@ -0,0 +1,16 @@
+--- a/tsocks.c
++++ b/tsocks.c
+@@ -659,10 +659,11 @@
+              * be ready for writing), otherwise we'll just let the select loop
+              * come around again (since we can't flag it for read, we don't 
know
+              * if there is any data to be read and can't be bothered 
checking) */
+-            if (conn->selectevents & WRITE) {
+-               setevents |= POLLOUT; 
++            if (conn->selectevents & POLLOUT) {
++               ufds[i].revents |= POLLOUT;
+                nevents++;
+             }
++            ufds[i].events = conn->selectevents;
+          }
+       }
+    } while (nevents == 0);

diff --git a/net-proxy/tsocks/tsocks-1.8_beta5-r7.ebuild 
b/net-proxy/tsocks/tsocks-1.8_beta5-r7.ebuild
index 8b2c2c1..949c1a0 100644
--- a/net-proxy/tsocks/tsocks-1.8_beta5-r7.ebuild
+++ b/net-proxy/tsocks/tsocks-1.8_beta5-r7.ebuild
@@ -23,7 +23,8 @@ src_prepare() {
        "${FILESDIR}/${P}-flags.patch" \
        "${FILESDIR}/${P}-ld_preload.patch" \
        "${FILESDIR}/${P}-rename.patch" \
-       "${FILESDIR}/${P}-bsd.patch"
+       "${FILESDIR}/${P}-bsd.patch" \
+       "${FILESDIR}/${P}-poll.patch"
        use tordns && epatch "../${PN}-${PV/_beta/b}-tordns1-gentoo-r2.patch"
        eautoreconf
 }

Reply via email to