summaryrefslogtreecommitdiff
path: root/benchmarks/netio/patches
diff options
context:
space:
mode:
authortron <tron>2003-09-28 14:40:06 +0000
committertron <tron>2003-09-28 14:40:06 +0000
commitcebfb2641c43f8e091845cfff5185a46fdc42a25 (patch)
tree4c6891a1751e8ffdfc8ce4cb5bed48d4b6488efc /benchmarks/netio/patches
parentb2cfc86036140494fcbc36124eefbcd9c3fd3c48 (diff)
downloadpkgsrc-cebfb2641c43f8e091845cfff5185a46fdc42a25.tar.gz
Fix spurios error messages and set socket buffer size. Bump package
revision to reflect changes.
Diffstat (limited to 'benchmarks/netio/patches')
-rw-r--r--benchmarks/netio/patches/patch-aa42
1 files changed, 32 insertions, 10 deletions
diff --git a/benchmarks/netio/patches/patch-aa b/benchmarks/netio/patches/patch-aa
index 328decf9d06..d87a6f7c843 100644
--- a/benchmarks/netio/patches/patch-aa
+++ b/benchmarks/netio/patches/patch-aa
@@ -1,13 +1,35 @@
-$NetBSD: patch-aa,v 1.3 2001/04/19 14:34:52 tron Exp $
+$NetBSD: patch-aa,v 1.4 2003/09/28 14:40:06 tron Exp $
---- Makefile.orig Thu Oct 28 19:37:44 1999
-+++ Makefile Tue Apr 17 14:16:41 2001
-@@ -57,6 +57,8 @@
- watt32:
- $(MAKE) all CC="gcc -g -O2" O=.o X=.exe OUT=-o \
- CFLAGS="-DWATT32 -I../../inc" LIBS="../../lib/libwatt.a"
-+pkgsrc:
-+ $(MAKE) all O=.o X= CFLAGS="$(CFLAGS) -DUNIX" LFLAGS="$(LDFLAGS)" OUT=-o
+--- netio.c.orig 2001-04-19 14:21:02.000000000 +0200
++++ netio.c 2003-09-28 16:31:19.000000000 +0200
+@@ -502,6 +502,10 @@
+ free(cBuffer);
+ return;
+ }
++#if defined(UNIX) && defined(SO_RCVBUF)
++ length = 65536;
++ (void) setsockopt(server, SOL_SOCKET, SO_RCVBUF, &length, sizeof (length));
++#endif
- INC = -I.
+ sa_server.sin_family = AF_INET;
+ sa_server.sin_port = htons(nPort);
+@@ -596,6 +600,10 @@
+ free(cBuffer);
+ return;
+ }
++#if defined(UNIX) && defined(SO_SNDBUF)
++ i = 65536;
++ (void) setsockopt(server, SOL_SOCKET, SO_SNDBUF, &i, sizeof (i));
++#endif
+ if (connect(server, (struct sockaddr *) &sa_server, sizeof(sa_server)) < 0)
+ {
+@@ -618,7 +626,7 @@
+ {
+ while (!bTimeOver)
+ {
+- if ((rc = send(server, cBuffer, tSizes[i], 0)) != tSizes[i] && errno != 0 && errno != EINTR)
++ if ((rc = send(server, cBuffer, tSizes[i], 0)) < 0 && errno != EINTR)
+ {
+ psock_errno("send()");
+ break;