pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/net/tsocks Fix serious portability issues (to NetBSD) ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/d2f908dbd2c8
branches: trunk
changeset: 518764:d2f908dbd2c8
user: jmmv <jmmv%pkgsrc.org@localhost>
date: Sun Sep 17 11:45:04 2006 +0000
description:
Fix serious portability issues (to NetBSD) as regards poll(2) usage.
This change lets, e.g. tnftp work when using tsocks. From soda@ in
PR pkg/30921. Bump PKGREVISION to 2.
diffstat:
net/tsocks/Makefile | 4 ++--
net/tsocks/distinfo | 5 +++--
net/tsocks/patches/patch-ac | 30 ++++++++++++++++++++++++++++--
net/tsocks/patches/patch-ad | 19 +++++++++++++++++++
4 files changed, 52 insertions(+), 6 deletions(-)
diffs (94 lines):
diff -r e5c56c7ef260 -r d2f908dbd2c8 net/tsocks/Makefile
--- a/net/tsocks/Makefile Sun Sep 17 08:23:46 2006 +0000
+++ b/net/tsocks/Makefile Sun Sep 17 11:45:04 2006 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.10 2006/04/22 09:22:13 rillig Exp $
+# $NetBSD: Makefile,v 1.11 2006/09/17 11:45:04 jmmv Exp $
#
DISTNAME= tsocks-1.8beta5
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=tsocks/}
diff -r e5c56c7ef260 -r d2f908dbd2c8 net/tsocks/distinfo
--- a/net/tsocks/distinfo Sun Sep 17 08:23:46 2006 +0000
+++ b/net/tsocks/distinfo Sun Sep 17 11:45:04 2006 +0000
@@ -1,8 +1,9 @@
-$NetBSD: distinfo,v 1.5 2006/03/23 16:37:46 joerg Exp $
+$NetBSD: distinfo,v 1.6 2006/09/17 11:45:04 jmmv Exp $
SHA1 (tsocks-1.8beta5.tar.gz) = 489f88c5df999ba21b27cdaa7836d9426d062aec
RMD160 (tsocks-1.8beta5.tar.gz) = 12e3eeeafaf7f3be21dd8901da38d5890659b09e
Size (tsocks-1.8beta5.tar.gz) = 83928 bytes
SHA1 (patch-aa) = a789618746a8666d2dc476f8b8ac975209892723
SHA1 (patch-ab) = 01f621f9b59d87b5305ea8b451b1bf1aab590700
-SHA1 (patch-ac) = 3e5c38ca7ea7c0a499e1ed42dca406b8d5769333
+SHA1 (patch-ac) = 2c913fde3564efdb40ed3b946218d3b4f64d584a
+SHA1 (patch-ad) = 1df65aaa8c87f65c58348015361de786aa3073f1
diff -r e5c56c7ef260 -r d2f908dbd2c8 net/tsocks/patches/patch-ac
--- a/net/tsocks/patches/patch-ac Sun Sep 17 08:23:46 2006 +0000
+++ b/net/tsocks/patches/patch-ac Sun Sep 17 11:45:04 2006 +0000
@@ -1,6 +1,9 @@
-$NetBSD: patch-ac,v 1.1 2005/08/04 10:22:21 drochner Exp $
+$NetBSD: patch-ac,v 1.2 2006/09/17 11:45:04 jmmv Exp $
---- tsocks.c.orig 2005-08-04 11:46:19.000000000 +0200
+Except for the first two chunks:
+https://sourceforge.net/tracker/index.php?func=detail&aid=1252703&group_id=17338&atid=117338
+
+--- tsocks.c.orig 2002-07-16 00:50:52.000000000 +0200
+++ tsocks.c
@@ -68,7 +68,7 @@ static int suid = 0;
static char *conffile = NULL;
@@ -20,3 +23,26 @@
#ifdef USE_OLD_DLSYM
void *lib;
#endif
+@@ -658,7 +658,7 @@ int poll(POLL_SIGNATURE) {
+ * 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;
++ ufds[i].revents |= (conn->selectevents & WRITE);
+ nevents++;
+ }
+ }
+@@ -852,7 +852,12 @@ static int connect_server(struct connreq
+ sizeof(conn->serveraddr));
+
+ show_msg(MSGDEBUG, "Connect returned %d, errno is %d\n", rc, errno);
+- if (rc) {
++ if (rc && errno == EISCONN) {
++ rc = 0;
++ show_msg(MSGDEBUG, "Socket %d already connected to SOCKET server\n",
++ conn->sockid);
++ conn->state = CONNECTED;
++ } else if (rc) {
+ if (errno != EINPROGRESS) {
+ show_msg(MSGERR, "Error %d attempting to connect to SOCKS "
+ "server (%s)\n", errno, strerror(errno));
diff -r e5c56c7ef260 -r d2f908dbd2c8 net/tsocks/patches/patch-ad
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/tsocks/patches/patch-ad Sun Sep 17 11:45:04 2006 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-ad,v 1.1 2006/09/17 11:45:04 jmmv Exp $
+
+https://sourceforge.net/tracker/index.php?func=detail&aid=1252703&group_id=17338&atid=117338
+
+--- tsocks.h.orig 2002-03-13 13:58:09.000000000 +0100
++++ tsocks.h
+@@ -75,9 +75,9 @@ struct connreq {
+ #define FAILED 14
+
+ /* Flags to indicate what events a socket was select()ed for */
+-#define READ (1<<0)
+-#define WRITE (1<<1)
+-#define EXCEPT (1<<2)
++#define READ (POLLIN|POLLRDNORM)
++#define WRITE (POLLOUT|POLLWRNORM|POLLWRBAND)
++#define EXCEPT (POLLRDBAND|POLLPRI)
+ #define READWRITE (READ|WRITE)
+ #define READWRITEEXCEPT (READ|WRITE|EXCEPT)
+
Home |
Main Index |
Thread Index |
Old Index