[MacPorts] #16324: [PATCH] tcpproxy - 1.1.9 - does not build
MacPorts
noreply at macports.org
Sat Aug 16 14:44:03 PDT 2008
#16324: [PATCH] tcpproxy - 1.1.9 - does not build
--------------------------------+-------------------------------------------
Reporter: cedstrom at gmail.com | Owner: macports-tickets at lists.macosforge.org
Type: defect | Status: new
Priority: Normal | Milestone: Port Updates
Component: ports | Version: 1.6.0
Keywords: |
--------------------------------+-------------------------------------------
tcpproxy is out of date and doesn't build. Here is a patch to fix that.
Apply to /trunk/dports/net/tcpproxy
{{{
Index: files/patch-tcpproxy.c.diff
===================================================================
--- files/patch-tcpproxy.c.diff (revision 39299)
+++ files/patch-tcpproxy.c.diff (working copy)
@@ -1,32 +1,97 @@
---- tcpproxy.c Sun Apr 4 23:30:30 2004
-+++ tcpproxy.c.new Thu May 27 17:10:28 2004
-@@ -87,7 +87,7 @@
- #include <unistd.h>
+--- acp.c 2005-10-28 10:18:03.000000000 -0700
++++ acp.c.new 2008-08-16 11:46:54.000000000 -0700
+@@ -29,7 +29,7 @@
+ #include <ctype.h>
#include <signal.h>
-#include <wait.h>
+#include <sys/wait.h>
#include <errno.h>
+ #include <time.h>
+
+--- makefile 2007-08-30 02:24:19.000000000 -0700
++++ makefile.new 2008-08-16 11:35:55.000000000 -0700
+@@ -1,6 +1,6 @@
+
+ CC = gcc
+-CFLAGS = -ggdb -O2 -Wall -DVERSION='"$(VERSION) $(RELEASE)"'
++CFLAGS = -ggdb -O2 -Wall -DVERSION='"$(VERSION) $(RELEASE)"'
-D__PREFIX__='"/opt/local"'
+
+ PROGRAM = tcpproxy
+ VERSION = 2.0.0-beta15
+
+--- procinfo.c 2006-01-07 06:03:13.000000000 -0800
++++ procinfo.c.new 2008-08-16 11:47:18.000000000 -0700
+@@ -29,7 +29,7 @@
+
#include <ctype.h>
- #include <pwd.h>
-@@ -105,8 +105,9 @@
- #include "ip-lib.h"
- #include "lib.h"
+ #include <signal.h>
+-#include <wait.h>
++#include <sys/wait.h>
+ #include <errno.h>
+ #include <time.h>
--#define PIDFILE "/var/run/tcpproxy.pid"
--#define ERROR_LOG "/tmp/tcpproxy-error.log"
-+#define CONFFILE "__PREFIX__/etc/tcpproxy.conf"
-+#define PIDFILE "__PREFIX__/var/run/tcpproxy.pid"
-+#define ERROR_LOG "__PREFIX__/var/log/tcpproxy-
error.log"
- #define MAX_PORT 80
+--- tcpproxy.c 2007-08-30 02:36:12.000000000 -0700
++++ tcpproxy.c.new 2008-08-16 11:46:34.000000000 -0700
+@@ -29,7 +29,7 @@
+ #include <ctype.h>
+ #include <signal.h>
+-#include <wait.h>
++#include <sys/wait.h>
+ #include <errno.h>
+ #include <time.h>
-@@ -1212,7 +1213,7 @@
+@@ -45,7 +45,7 @@
+ #include <syslog.h>
+ #include <sys/time.h>
+
+-#include <linux/netfilter_ipv4.h>
++/* #include <linux/netfilter_ipv4.h> */
+
+
+
+@@ -677,7 +677,7 @@
if (*configfile != 0)
- read_configuration(configfile, x);
+ read_configuration(config, configfile);
else if (bound == 0 && k >= argc) {
- copy_string(configfile, "/etc/tcpproxy.conf",
sizeof(configfile));
+ copy_string(configfile, CONFFILE, sizeof(configfile));
- standalone = 1;
- read_configuration(configfile, x);
+ /* This default is the most common cause for tcpproxy
installations
+ * to fail initially.
+@@ -1012,15 +1012,18 @@
+
+
+ if (x->redirmode != 0) {
+- int rc;
++ //int rc;
+ size_t socksize;
+ struct sockaddr_in sock;
+
+ socksize = sizeof(sock);
++#if 0
+ rc = getsockopt(0, SOL_IP, SO_ORIGINAL_DST, &sock,
&socksize);
+ if (rc != 0)
+ ;
+- else if (strcmp((char *) inet_ntoa(sock.sin_addr),
x->sock.ipnum) != 0 ||
++ else
++#endif
++ if (strcmp((char *) inet_ntoa(sock.sin_addr),
x->sock.ipnum) != 0 ||
+ ntohs(sock.sin_port) != x->sock.port) {
+
+ /*
+--- tcpproxy.h 2006-08-28 11:20:46.000000000 -0700
++++ tcpproxy.h.new 2008-08-16 11:37:14.000000000 -0700
+@@ -7,8 +7,9 @@
+
+
+ #define PROXYNAME "tcpproxy"
+-#define PIDFILE "/var/run/tcpproxy.pid"
+-#define ERROR_LOG "/tmp/tcpproxy-error.log"
++#define CONFFILE "__PREFIX__/etc/tcpproxy.conf"
++#define PIDFILE "__PREFIX__/run/tcpproxy.pid"
++#define ERROR_LOG "__PREFIX__/tcpproxy-error.log"
+ #define MAX_PORT 80
+
+
Index: Portfile
===================================================================
--- Portfile (revision 39299)
+++ Portfile (working copy)
@@ -3,16 +3,16 @@
PortSystem 1.0
name tcpproxy
-version 1.1.9
+version 2.0.0-beta15
categories net
platforms darwin
-maintainers nomaintainer
+maintainers openmaintainer at macports.org
description tcpproxy is a proxy (tunnel, redirector) for TCP/IP
protocols
long_description ${description}
-homepage http://quietsche-entchen.de/cgi-
bin/wiki.cgi/software/tcpproxy.yawk
-master_sites http://quietsche-entchen.de/cgi-bin/wiki.cgi/download/
-checksums md5 7ae45da0d1b263bc507be97e35dbb15b
+homepage http://quietsche-entchen.de/cgi-
bin/wiki.cgi/proxies/TcpProxy
+master_sites http://quietsche-entchen.de/download/
+checksums md5 e946f807049d6296f54aa57b5c17f1c8
patchfiles patch-tcpproxy.c.diff
configure {
}}}
--
Ticket URL: <http://trac.macports.org/ticket/16324>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list