summaryrefslogtreecommitdiff
path: root/net/ttcp
diff options
context:
space:
mode:
authorabs <abs@pkgsrc.org>1999-09-07 03:48:19 +0000
committerabs <abs@pkgsrc.org>1999-09-07 03:48:19 +0000
commit15f7d8a7a43983cab8668465398862f313773299 (patch)
tree71bdab9880af9341954f5e889428a416325786d1 /net/ttcp
parentc2f4e05e9b21a796f54c13460310b99924b080f3 (diff)
downloadpkgsrc-15f7d8a7a43983cab8668465398862f313773299.tar.gz
Compile under Solaris
Diffstat (limited to 'net/ttcp')
-rw-r--r--net/ttcp/files/patch-sum4
-rw-r--r--net/ttcp/patches/patch-ab202
2 files changed, 80 insertions, 126 deletions
diff --git a/net/ttcp/files/patch-sum b/net/ttcp/files/patch-sum
index f7d06d18035..078630b971a 100644
--- a/net/ttcp/files/patch-sum
+++ b/net/ttcp/files/patch-sum
@@ -1,4 +1,4 @@
-$NetBSD: patch-sum,v 1.1 1999/07/09 14:12:30 agc Exp $
+$NetBSD: patch-sum,v 1.2 1999/09/07 03:48:19 abs Exp $
MD5 (patch-aa) = b315439e15cabb150a6d16524c461a25
-MD5 (patch-ab) = 89c331b6c4a50068a431f42c651e62eb
+MD5 (patch-ab) = 9b425ebf1c606c9d541ad30a23659d53
diff --git a/net/ttcp/patches/patch-ab b/net/ttcp/patches/patch-ab
index 470e564f074..f46c1db3e1e 100644
--- a/net/ttcp/patches/patch-ab
+++ b/net/ttcp/patches/patch-ab
@@ -1,124 +1,78 @@
-$NetBSD: patch-ab,v 1.3 1998/08/07 11:11:02 agc Exp $
-
-*** ttcp.c.orig Thu Feb 27 13:30:23 1997
---- ttcp.c Tue Jan 27 13:51:55 1998
-***************
-*** 55,60 ****
---- 55,61 ----
- #include <arpa/inet.h>
- #include <netdb.h>
- #include <sys/time.h> /* struct timeval */
-+ #include <stdlib.h>
-
- #if defined(SYSV)
- #include <sys/times.h>
-***************
-*** 263,269 ****
- if ( (buf = (char *)malloc(buflen+bufalign)) == (char *)NULL)
- err("malloc");
- if (bufalign != 0)
-! buf +=(bufalign - ((int)buf % bufalign) + bufoffset) % bufalign;
-
- if (trans) {
- fprintf(stdout,
---- 264,270 ----
- if ( (buf = (char *)malloc(buflen+bufalign)) == (char *)NULL)
- err("malloc");
- if (bufalign != 0)
-! buf +=(bufalign - ((u_long)buf % bufalign) + bufoffset) % bufalign;
-
- if (trans) {
- fprintf(stdout,
-***************
-*** 285,291 ****
- err("socket");
- mes("socket");
-
-! if (bind(fd, &sinme, sizeof(sinme)) < 0)
- err("bind");
-
- #if defined(SO_SNDBUF) || defined(SO_RCVBUF)
---- 286,292 ----
- err("socket");
- mes("socket");
-
-! if (bind(fd, (struct sockaddr *)&sinme, sizeof(sinme)) < 0)
- err("bind");
-
- #if defined(SO_SNDBUF) || defined(SO_RCVBUF)
-***************
-*** 326,332 ****
- mes("nodelay");
- }
- #endif
-! if(connect(fd, &sinhim, sizeof(sinhim) ) < 0)
- err("connect");
- mes("connect");
- } else {
---- 327,333 ----
- mes("nodelay");
- }
- #endif
-! if(connect(fd, (struct sockaddr *)&sinhim, sizeof(sinhim) ) < 0)
- err("connect");
- mes("connect");
- } else {
-***************
-*** 348,358 ****
- }
- fromlen = sizeof(frominet);
- domain = AF_INET;
-! if((fd=accept(fd, &frominet, &fromlen) ) < 0)
- err("accept");
- { struct sockaddr_in peer;
- int peerlen = sizeof(peer);
-! if (getpeername(fd, (struct sockaddr_in *) &peer,
- &peerlen) < 0) {
- err("getpeername");
- }
---- 349,359 ----
- }
- fromlen = sizeof(frominet);
- domain = AF_INET;
-! if((fd=accept(fd, (struct sockaddr *)&frominet, &fromlen) ) < 0)
- err("accept");
- { struct sockaddr_in peer;
- int peerlen = sizeof(peer);
-! if (getpeername(fd, (struct sockaddr *) &peer,
- &peerlen) < 0) {
- err("getpeername");
- }
-***************
-*** 752,758 ****
- int len = sizeof(from);
- register int cnt;
- if( udp ) {
-! cnt = recvfrom( fd, buf, count, 0, &from, &len );
- numCalls++;
- } else {
- if( b_flag )
---- 753,759 ----
- int len = sizeof(from);
- register int cnt;
- if( udp ) {
-! cnt = recvfrom( fd, buf, count, 0, (struct sockaddr *)&from, &len );
- numCalls++;
- } else {
- if( b_flag )
-***************
-*** 782,788 ****
- register int cnt;
- if( udp ) {
- again:
-! cnt = sendto( fd, buf, count, 0, &sinhim, sizeof(sinhim) );
- numCalls++;
- if( cnt<0 && errno == ENOBUFS ) {
- delay(18000);
---- 783,789 ----
- register int cnt;
- if( udp ) {
- again:
-! cnt = sendto( fd, buf, count, 0, (struct sockaddr *)&sinhim, sizeof(sinhim) );
- numCalls++;
- if( cnt<0 && errno == ENOBUFS ) {
- delay(18000);
+--- 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 );
+ }
+
+ /*