Incompatibility between net/if.h and STL map class

Herrick, Steve SHERRICK@SYSTEMS.TEXTRON.com
Fri Aug 25 08:46:00 GMT 2000


Hello:

 I am using GNU gcc and g++ on a Solaris 2.7 system and recently discovered
an incompatibility between the STL class map<> and a struct map that occurs
in <net/if.h>. The compiler complained about this and that is how it was
discovered. There is a structure declared in <net/if.h> called struct ifnet
that has as a last element  "struct map *if_memmap"  This would not compile
when using this include along with the STL map. I worked around it by
created my own local version of the include and commenting out the ifnet
structure since I do not use it but that is not the real solution.

Please reply...

Thanks,

Steve Herrick
Textron Systems Division
Sherrick@systems.textron.com




More information about the Gcc-bugs mailing list