@@ -0,0 +1,26 @@
1+From Ingo Hadan <ingo.hadan@sdm.de> Fri, 02 Apr 2010 21:08:50 +0200
2+From: Julien Moutinho <julm+tsocks@autogeree.net>
3+Date: Fri, 26 Apr 2013 01:57:26 +0200
4+Subject: tsocks fails if socksified application uses poll(2) (e.g. subversion-1.5)
5+
6+---
7+diff --git a/tsocks.c b/tsocks.c
8+index 9cfdfff..470babd 100644
9+--- a/tsocks.c
10++++ b/tsocks.c
11+@@ -657,10 +657,11 @@ int poll(POLL_SIGNATURE) {
12+ * be ready for writing), otherwise we'll just let the select loop
13+ * come around again (since we can't flag it for read, we don't know
14+ * if there is any data to be read and can't be bothered checking) */
15+- if (conn->selectevents & WRITE) {
16+- setevents |= POLLOUT;
17++ if (conn->selectevents & POLLOUT) {
18++ ufds[i].revents |= POLLOUT;
19+ nevents++;
20+ }
21++ ufds[i].events = conn->selectevents;
22+ }
23+ }
24+ } while (nevents == 0);
25+
26+