[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

linux includes / inet includes



hi, i'm trying to fix up vrweb, and if successful will apply for adoption
and all that (already talked to the original maintainer).

anyway, the current problem is the conflict between the linux includes and
debian's netinet includes:

/usr/include/linux/byteorder/generic.h:150: previous declaration of `short
unsigned int ntohs(short unsigned int)' with C++ linkage
/usr/include/netinet/in.h:235: conflicts with new declaration with C
linkage
/usr/include/linux/byteorder/generic.h:152: previous declaration of `short
unsigned int htons(short unsigned int)' with C++ linkage
/usr/include/netinet/in.h:237: conflicts with new declaration with C
linkage


as you can see i have copied the linux-includes to /usr/include/linux (as
this seems to want), but the file in.h redeclares some of the stuff in the
linux header files...

the linux headers seem to want priority with some #undefs, but i assume
that this problem is arising because the netinet header file is being
included after the linux header file.

SO, the question is: which file has the correct implementation /
declaration? which file am i supposed to be using? i think i heard that
the linux header files were _not_ supposed to be used, but am unsure... i
have started to "fix" my immediate problem by adding some #ifndef thingies
around the netinet code, but am looking for a real fix.

if this is going to generate a long arguement over what is correct, please
suggest a "kinda correct" dirty hack so that i can continue debugging.

thanks in advance,
Paul


Reply to: