diff options
Diffstat (limited to 'benchmarks/nettest/patches/patch-ac')
-rw-r--r-- | benchmarks/nettest/patches/patch-ac | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/benchmarks/nettest/patches/patch-ac b/benchmarks/nettest/patches/patch-ac new file mode 100644 index 00000000000..5472285ee22 --- /dev/null +++ b/benchmarks/nettest/patches/patch-ac @@ -0,0 +1,65 @@ +$NetBSD: patch-ac,v 1.1.1.1 2003/04/11 17:07:23 cjep Exp $ + +--- nettest.c.orig 1992-11-05 21:52:58.000000000 +0000 ++++ nettest.c +@@ -92,7 +92,11 @@ int kbufsize = 0; + int nodelay = 0; + int mesghdr = 0; + ++#ifdef BSD44 ++clock_t times(); ++#else + long times(); ++#endif + #if !defined(CRAY) && !defined(SYSV) + #define GETTIMES(a, b) ftime(&a); times(&b); + #define TIMETYPE struct timeb +@@ -126,7 +130,8 @@ struct sockaddr_iso to_s = {sizeof(to_s) + + void do_children(), do_stream(), usage(), do_dgram(), prtimes(); + +-int read(), recv(); ++int read(); ++ssize_t recv(); + + int (*rfunc)() = read; + +@@ -550,7 +555,11 @@ main(argc, argv) + shutdown(s, 2); + exit(0); + } ++#ifdef BSD44 ++ if (connect(s, (struct sockaddr *)&name, namesize) < 0) { ++#else + if (connect(s, (char *)&name, namesize) < 0) { ++#endif + perror("connect"); + exit(1); + } +@@ -1160,8 +1169,8 @@ do_dgram(s) + *data = 0; + for (i = 0; i < nchunks; i++) { + ret = mesghdr ? sendmsg(s, &outmsg, 0) +- : sendto(s, data, chunksize, 0, (caddr_t)&name, +- namesize); ++ : sendto(s, data, chunksize, 0, ++ (struct sockaddr *)&name, namesize); + + if (ret < 0) { + perror(mesghdr ? "sendmsg" : "sendto"); +@@ -1397,12 +1406,13 @@ parsetos(name, proto) + register char *c; + int tos; + ++#undef IP_TOS + #ifdef IP_TOS + struct tosent *tosp; + +- tosp = gettosbyname(name, proto); ++ tosp = (struct tosent *)gettosbyname(name, proto); + if (tosp) { +- tos = tosp->t_tos; ++ tos = (int)tosp->t_tos; + } else { + #endif + for (c = name; *c; c++) { |