Date: Thu, 31 Dec 1998 08:43:00 -0800 (PST) From: "Brian W. Buchanan" <brian@CSUA.Berkeley.EDU> To: Alex Zepeda <garbanzo@hooked.net> Cc: current <current@FreeBSD.ORG> Subject: Re: egcs chokes on netinet/in.h.. Message-ID: <Pine.BSF.4.05.9812310837360.325-100000@smarter.than.nu> In-Reply-To: <Pine.BSF.4.05.9812310146490.42452-100000@zippy.dyn.ml.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 31 Dec 1998, Alex Zepeda wrote: > /usr/include/netinet/in.h:291: ANSI C++ forbids data member `ip_opts' with > same name as enclosing class > > In upgrading my egcs (to get around some rather annoying bugs), this seems > to have been changed from a warning to a fatal error. Is there any > possibility that the ip_opts member could be named _ip_opts or somesuch? > > struct ip_opts { > struct in_addr ip_dst; /* first hop, 0 w/o src rt */ > char ip_opts[40]; /* actually variable in size */ > }; This seems like a rather stupid restriction of ANSI C++, and in any case, the compiler shouldn't treat it as a fatal error unless you specified -ansi -pedantic. To fix this without hacking the compiler to fix the bug, perhaps try wrapping the include directive: extern "C" { #include <netinet/in.h> } -- Brian Buchanan brian@smarter.than.nu brian@CSUA.Berkeley.EDU "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -- Benjamin Franklin, 1759 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9812310837360.325-100000>