diff options
author | tron <tron@pkgsrc.org> | 2001-04-17 11:57:41 +0000 |
---|---|---|
committer | tron <tron@pkgsrc.org> | 2001-04-17 11:57:41 +0000 |
commit | 28915cc5a90cdb24fb9ff73098a26be3901fca23 (patch) | |
tree | c0c3e1c4595c14f096ab42405c1503d81152e6c9 /benchmarks/ttcp/patches | |
parent | bbc67fac9159e0609769d052c8790459dad24b26 (diff) | |
download | pkgsrc-28915cc5a90cdb24fb9ff73098a26be3901fca23.tar.gz |
Move "ttcp" package to category "benchmarks".
Diffstat (limited to 'benchmarks/ttcp/patches')
-rw-r--r-- | benchmarks/ttcp/patches/patch-aa | 14 | ||||
-rw-r--r-- | benchmarks/ttcp/patches/patch-ab | 79 |
2 files changed, 93 insertions, 0 deletions
diff --git a/benchmarks/ttcp/patches/patch-aa b/benchmarks/ttcp/patches/patch-aa new file mode 100644 index 00000000000..90734063da1 --- /dev/null +++ b/benchmarks/ttcp/patches/patch-aa @@ -0,0 +1,14 @@ +$NetBSD: patch-aa,v 1.1 2001/04/17 11:57:42 tron Exp $ + +--- Makefile.orig Sat Mar 7 13:39:48 1998 ++++ Makefile Sat Mar 7 13:40:07 1998 +@@ -0,0 +1,9 @@ ++ ++PROG= ttcp ++ ++BINDIR=${PREFIX}/bin ++MANDIR=${PREFIX}/man ++ ++MANINSTALL= maninstall catinstall ++ ++.include <bsd.prog.mk> diff --git a/benchmarks/ttcp/patches/patch-ab b/benchmarks/ttcp/patches/patch-ab new file mode 100644 index 00000000000..66a084b75c9 --- /dev/null +++ b/benchmarks/ttcp/patches/patch-ab @@ -0,0 +1,79 @@ +$NetBSD: patch-ab,v 1.1 2001/04/17 11:57:42 tron Exp $ +--- ttcp.c.orig Fri Aug 6 15:30:21 1999 ++++ ttcp.c Fri Aug 6 15:30:21 1999 +@@ -55,6 +55,7 @@ + #include <arpa/inet.h> + #include <netdb.h> + #include <sys/time.h> /* struct timeval */ ++#include <stdlib.h> + + #if defined(SYSV) + #include <sys/times.h> +@@ -263,7 +264,7 @@ + if ( (buf = (char *)malloc(buflen+bufalign)) == (char *)NULL) + err("malloc"); + if (bufalign != 0) +- buf +=(bufalign - ((int)buf % bufalign) + bufoffset) % bufalign; ++ buf +=(bufalign - ((u_long)buf % bufalign) + bufoffset) % bufalign; + + if (trans) { + fprintf(stdout, +@@ -285,7 +286,7 @@ + err("socket"); + mes("socket"); + +- if (bind(fd, &sinme, sizeof(sinme)) < 0) ++ if (bind(fd, (struct sockaddr *)&sinme, sizeof(sinme)) < 0) + err("bind"); + + #if defined(SO_SNDBUF) || defined(SO_RCVBUF) +@@ -326,7 +327,7 @@ + mes("nodelay"); + } + #endif +- if(connect(fd, &sinhim, sizeof(sinhim) ) < 0) ++ if(connect(fd, (struct sockaddr *)&sinhim, sizeof(sinhim) ) < 0) + err("connect"); + mes("connect"); + } else { +@@ -348,11 +349,11 @@ + } + fromlen = sizeof(frominet); + domain = AF_INET; +- if((fd=accept(fd, &frominet, &fromlen) ) < 0) ++ if((fd=accept(fd, (struct sockaddr *)&frominet, &fromlen) ) < 0) + err("accept"); + { struct sockaddr_in peer; + int peerlen = sizeof(peer); +- if (getpeername(fd, (struct sockaddr_in *) &peer, ++ if (getpeername(fd, (struct sockaddr *) &peer, + &peerlen) < 0) { + err("getpeername"); + } +@@ -752,7 +753,7 @@ + int len = sizeof(from); + register int cnt; + if( udp ) { +- cnt = recvfrom( fd, buf, count, 0, &from, &len ); ++ cnt = recvfrom( fd, buf, count, 0, (struct sockaddr *)&from, &len ); + numCalls++; + } else { + if( b_flag ) +@@ -782,7 +783,7 @@ + register int cnt; + if( udp ) { + again: +- cnt = sendto( fd, buf, count, 0, &sinhim, sizeof(sinhim) ); ++ cnt = sendto( fd, buf, count, 0, (struct sockaddr *)&sinhim, sizeof(sinhim) ); + numCalls++; + if( cnt<0 && errno == ENOBUFS ) { + delay(18000); +@@ -803,7 +804,7 @@ + + tv.tv_sec = 0; + tv.tv_usec = us; +- (void)select( 1, (char *)0, (char *)0, (char *)0, &tv ); ++ (void)select( 1, (void *)0, (void *)0, (void *)0, &tv ); + } + + /* |