Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Sep 2000 17:36:05 -0700 (PDT)
From:      John Polstra <jdp@polstra.com>
To:        hackers@freebsd.org
Cc:        archie@whistle.com
Subject:   Re: c++ error
Message-ID:  <200009140036.RAA01292@vashon.polstra.com>
In-Reply-To: <200009140019.RAA04988@bubba.whistle.com>
References:  <200009140019.RAA04988@bubba.whistle.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <200009140019.RAA04988@bubba.whistle.com>,
Archie Cobbs  <archie@whistle.com> wrote:
> John Polstra writes:
> > > On the other hand, nothing in the kernel actually uses "struct ip_opts",
> > > though I haven't checked all of userland.. so we may just be able to
> > > remove it.
> > 
> > >From <netinet/in.h> it looks like a couple of [gs]etsockopt calls
> > use it.  Search for "ip_opts" just past that structure declaration.
> 
> Oh, duh.. I was only checking C files..

About the best fix I can think of (and it's not very good) is to
change <netinet/in.h> so the structure is declared like this:

struct ip_opts {
	struct	in_addr ip_dst;		/* first hop, 0 w/o src rt */
#ifdef __cplusplus
	char	ip_optbuf[40];		/* actually variable in size */
#else
	char	ip_opts[40];		/* actually variable in size */
#endif
};

This shouldn't break any C++ code, since it already wouldn't compile
anyway. :-)

John
-- 
  John Polstra                                               jdp@polstra.com
  John D. Polstra & Co., Inc.                        Seattle, Washington USA
  "Disappointment is a good sign of basic intelligence."  -- Chögyam Trungpa



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009140036.RAA01292>