From 431c536c8aabd23dcd5eebc87ec8b0b2daf89e45 Mon Sep 17 00:00:00 2001 From: tron Date: Sun, 2 Jul 2006 15:11:44 +0000 Subject: Fix compile warnings with GCC 4.x by using "socklen_t" were appropriate. --- benchmarks/netio/distinfo | 3 ++- benchmarks/netio/patches/patch-aa | 41 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 benchmarks/netio/patches/patch-aa (limited to 'benchmarks') diff --git a/benchmarks/netio/distinfo b/benchmarks/netio/distinfo index dc9d8036f42..a01153c035c 100644 --- a/benchmarks/netio/distinfo +++ b/benchmarks/netio/distinfo @@ -1,5 +1,6 @@ -$NetBSD: distinfo,v 1.9 2006/07/02 15:02:59 tron Exp $ +$NetBSD: distinfo,v 1.10 2006/07/02 15:11:44 tron Exp $ SHA1 (netio126.zip) = ef63e9b0564445a1831b53be98a5472dbceaa922 RMD160 (netio126.zip) = bff92f25df1df87c7075432b1da3e0f7defe1e30 Size (netio126.zip) = 140402 bytes +SHA1 (patch-aa) = 194bb630fd09f2cc5c8a6842212eb01adb676584 diff --git a/benchmarks/netio/patches/patch-aa b/benchmarks/netio/patches/patch-aa new file mode 100644 index 00000000000..c412dd89a67 --- /dev/null +++ b/benchmarks/netio/patches/patch-aa @@ -0,0 +1,41 @@ +$NetBSD: patch-aa,v 1.6 2006/07/02 15:12:52 tron Exp $ + +--- netio.c.orig 2005-08-30 16:47:18.000000000 +0100 ++++ netio.c 2006-07-02 16:08:52.000000000 +0100 +@@ -796,7 +796,7 @@ + long long nData; + struct sockaddr_in sa_server, sa_client; + int server, client; +- size_t length; ++ socklen_t length; + struct timeval tv; + fd_set fds; + int rc; +@@ -1123,7 +1123,7 @@ + char *cBuffer; + struct sockaddr_in sa_server, sa_client; + int rc; +- size_t nBytes; ++ socklen_t nBytes; + + if ((cBuffer = InitBuffer(TMAXSIZE)) == NULL) + { +@@ -1187,6 +1187,7 @@ + fd_set fds; + int rc, nByte; + size_t nLength; ++ socklen_t sLength; + + if ((cBuffer = InitBuffer(TMAXSIZE)) == NULL) + { +@@ -1242,8 +1243,8 @@ + if (rc == 0 || FD_ISSET(server, &fds) == 0) + continue; + +- nLength = sizeof(sa_client); +- if ((client = accept(server, (struct sockaddr *) &sa_client, &nLength)) == -1) ++ sLength = sizeof(sa_client); ++ if ((client = accept(server, (struct sockaddr *) &sa_client, &sLength)) == -1) + continue; + + setsockopt(client, SOL_SOCKET, SO_RCVBUF, (char *) &sobufsize, sizeof(sobufsize)); -- cgit v1.2.3