diff options
author | tron <tron@pkgsrc.org> | 2003-03-19 13:12:22 +0000 |
---|---|---|
committer | tron <tron@pkgsrc.org> | 2003-03-19 13:12:22 +0000 |
commit | 70731fed73af77561feed31631dd6051bdcfc5e1 (patch) | |
tree | e637df0024f86702aab1f74bef2bf3411dfd1692 /benchmarks/ttcp/patches | |
parent | c798733a8cdbdb3db283a9368d508c5962f141c8 (diff) | |
download | pkgsrc-70731fed73af77561feed31631dd6051bdcfc5e1.tar.gz |
Initialize the address family before calling bind(2) which fixes the
receive mode under NetBSD-current. Bump package revision after this
important bug-fix.
Diffstat (limited to 'benchmarks/ttcp/patches')
-rw-r--r-- | benchmarks/ttcp/patches/patch-ab | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/benchmarks/ttcp/patches/patch-ab b/benchmarks/ttcp/patches/patch-ab index b20c56f88a8..51d657c088f 100644 --- a/benchmarks/ttcp/patches/patch-ab +++ b/benchmarks/ttcp/patches/patch-ab @@ -1,7 +1,7 @@ -$NetBSD: patch-ab,v 1.3 2002/06/11 21:56:55 itojun Exp $ +$NetBSD: patch-ab,v 1.4 2003/03/19 13:12:23 tron Exp $ ---- ttcp.c.orig Fri Feb 28 06:30:23 1997 -+++ ttcp.c Wed Jun 12 06:54:28 2002 +--- ttcp.c.orig 1997-02-27 22:30:23.000000000 +0100 ++++ ttcp.c 2003-03-19 14:09:08.000000000 +0100 @@ -55,6 +55,7 @@ #include <arpa/inet.h> #include <netdb.h> @@ -28,16 +28,17 @@ $NetBSD: patch-ab,v 1.3 2002/06/11 21:56:55 itojun Exp $ if (trans) { fprintf(stdout, -@@ -285,7 +286,7 @@ +@@ -285,7 +286,8 @@ err("socket"); mes("socket"); - if (bind(fd, &sinme, sizeof(sinme)) < 0) ++ sinme.sin_family = AF_INET; + if (bind(fd, (struct sockaddr *)&sinme, sizeof(sinme)) < 0) err("bind"); #if defined(SO_SNDBUF) || defined(SO_RCVBUF) -@@ -326,7 +327,7 @@ +@@ -326,7 +328,7 @@ mes("nodelay"); } #endif @@ -46,7 +47,7 @@ $NetBSD: patch-ab,v 1.3 2002/06/11 21:56:55 itojun Exp $ err("connect"); mes("connect"); } else { -@@ -348,11 +349,11 @@ +@@ -348,11 +350,11 @@ } fromlen = sizeof(frominet); domain = AF_INET; @@ -60,7 +61,7 @@ $NetBSD: patch-ab,v 1.3 2002/06/11 21:56:55 itojun Exp $ &peerlen) < 0) { err("getpeername"); } -@@ -752,7 +753,7 @@ +@@ -752,7 +754,7 @@ int len = sizeof(from); register int cnt; if( udp ) { @@ -69,7 +70,7 @@ $NetBSD: patch-ab,v 1.3 2002/06/11 21:56:55 itojun Exp $ numCalls++; } else { if( b_flag ) -@@ -782,7 +783,7 @@ +@@ -782,7 +784,7 @@ register int cnt; if( udp ) { again: @@ -78,7 +79,7 @@ $NetBSD: patch-ab,v 1.3 2002/06/11 21:56:55 itojun Exp $ numCalls++; if( cnt<0 && errno == ENOBUFS ) { delay(18000); -@@ -803,7 +804,7 @@ +@@ -803,7 +805,7 @@ tv.tv_sec = 0; tv.tv_usec = us; |