[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] ns-allinone-2.1b6: installation problem
On Wed, 5 Jul 2000, Ishan Mandrekar wrote:
> Download the daily snapshot of NS and replace the
> files ~/ns-allinone-2.1b6/ns-2.1b6/indep-utils/webtrace-conv/ucb/utils.*
> from the ns-allinone package with the ones from the snapshot
> and then do an install. This should take care of the socklen_t * error.
A few days ago Julien Franiatte <[email protected]> posted a
two-line fix for this in this list. It worked for me as well, so I made
this small diff that fixes this problem in ns-2.1b6 ..
to apply it, change to directory to
ns-allinone-2.1b6/ns-2.1b6/indep-utils/webtrace-conv/ucb/ and type..
patch < utils.cc.diff
> > utils.o utils.cc
> > utils.cc: In function `int saccept(int)':
> > utils.cc:358: passing `int *' as argument 3 of `accept(int, sockaddr *,
> > socklen_t *)' changes signedness
> > utils.cc: In function `int sportnum(int)':
> > utils.cc:469: passing `int *' as argument 3 of `getsockname(int,
> > sockaddr *, socklen_t *)' changes signedness
> > make[1]: *** [utils.o] Error 1
_ _ _|_ o._ o _
_)(_) |_ || |_>
--- utils.cc Tue Nov 30 04:25:56 1999
+++ utils.cc.fixed Thu Jul 6 14:40:00 2000
@@ -355,7 +355,7 @@
int ns;
fromlen = sizeof (from);
- if ((ns = accept (s, (struct sockaddr*)&from, &fromlen)) < 0)
+ if ((ns = accept (s, (struct sockaddr*)&from, (socklen_t *)(&fromlen))) < 0)
return -1;
return ns;
}
@@ -466,7 +466,7 @@
int len;
len = sizeof (sockname);
- if (getsockname (s, &sockname, &len) < 0)
+ if (getsockname (s, &sockname,(socklen_t *)(&len)) < 0)
return -1;
if (sockname.sa_family != AF_INET)