*BSD News Article 64772


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mira.net.au!yarrina.connect.com.au!news.mel.connect.com.au!munnari.OZ.AU!spool.mu.edu!agate!howland.reston.ans.net!vixen.cso.uiuc.edu!uwm.edu!fnnews.fnal.gov!stc06.ctd.ornl.gov!news.er.usgs.gov!mcmcnews.cr.usgs.gov!news.cs.indiana.edu!news.nstn.ca!coranto.ucs.mun.ca!news.unb.ca!usenet
From: Peter Howlett <Peter.Howlett@ASG.unb.ca>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: struct ifnet with gcc
Date: Wed, 27 Mar 1996 22:10:10 +0000
Organization: Atlantic Systems Group
Lines: 31
Message-ID: <3159BCC2.41C67EA6@ASG.unb.ca>
NNTP-Posting-Host: bunny.asg.unb.ca
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 2.0 (X11; I; FreeBSD 2.1.0-RELEASE i386)

Anyone ever try compiling a G++ program including <net/if.h> ?

It has the ifnet struct with struct if_data declared inside it

struct ifnet {
	.
	.
	.
	struct if_data {
		.
		.
	} if_data;
}

Of course if_data is declared in the scope of ifnet, so when
if_data is referenced again in the file below, g++ kicks
and screams.

I know there are lots of things I can do to fix this, but I
thought maybe someone might think its more appropriate to
declare if_data in the scope it was meant to be used in for
the regular release of FreeBSD. (by the way, its the same
in NetBSD too)

Regards, 

--------------------------------------------------------------------
Peter Howlett                           Atlantic Systems Group
E-Mail: Peter.Howlett@ASG.unb.ca        Fredericton, N.B. Canada
http://www.ASG.unb.ca/personal/ph.html  Phone: (506) 447-3050
PGP Key ID: 60F2EEC1                    Fax:   (506) 453-5004