This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] new tcp_open
Those warnings were always there. My patch reverted those lines back
to what was there before. However, it does appear that changing the char *
cast to a void * would eliminate the warning and should probably work
everywhere. Systems that based their sockets on very old BSD have char *
instead of void * in their setsockopt prototypes.
I tested void * on Linux and Windows and neither complain. I have been
trying all day on a Solaris box, but it just can't seem to compile
GDB in less than a couple of days. How can a big Ultrasparc with
a load average of 0.08 take > 12 hours to build GDB???
Martin
On Wednesday 19 December 2001 02:45 pm, Elena Zannoni wrote:
> Martin, I am getting these warnings on solaris (with ,-Werror):
>
>
> cc1: warnings being treated as errors
> /es/scratch/ezannoni/uberbaum/src/gdb/ser-tcp.c: In function `tcp_open':
> /es/scratch/ezannoni/uberbaum/src/gdb/ser-tcp.c:154: warning: passing arg 4
> of `getsockopt' from incompatible pointer type make: *** [ser-tcp.o] Error
> 1
>
> Elena
>
> Martin M. Hunt writes:
> > Checked in.
> >
> > Martin
> >
> > On Tuesday 18 December 2001 03:21 am, Andrew Cagney wrote:
> > > > Please give this patch a try and see if it fixes the problem.
> > > >
> > > > Index: ser-tcp.c
> > > > ===================================================================
> > > > RCS file: /cvs/src/src/gdb/ser-tcp.c,v
> > > > retrieving revision 1.9
> > > > diff -u -p -r1.9 ser-tcp.c
> > > > --- ser-tcp.c 2001/12/07 17:57:05 1.9
> > > > +++ ser-tcp.c 2001/12/18 10:54:31
> > > > @@ -165,6 +165,10 @@ tcp_open (struct serial *scb, const char
> > > > tmp = 0;
> > > > ioctl (scb->fd, FIONBIO, &tmp);
> > > >
> > > > + tmp = 1;
> > > > + setsockopt (scb->fd, IPPROTO_TCP, TCP_NODELAY,
> > > > + (char *)&tmp, sizeof (tmp));
> > > > +
> > > > /* If we don't do this, then GDB simply exits
> > > > when the remote side dies. */
> > > > signal (SIGPIPE, SIG_IGN);
> > >
> > > If it does, feel free to check it, and any other related changes in
> > > :-)
> > >
> > >
> > > Andrew