www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/10/05/16:49:25

From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: What version is needed when I compile the Libnet?
Date: Fri, 05 Oct 2001 21:24:02 +0100
Lines: 54
Message-ID: <3BBE16E2.4C4C1B9B@phekda.freeserve.co.uk>
References: <9pj1vf$fnu$1 AT gemini DOT ntu DOT edu DOT tw>
NNTP-Posting-Host: modem-241.magnesium.dialup.pol.co.uk
Mime-Version: 1.0
X-Trace: newsg1.svr.pol.co.uk 1002314025 24453 62.136.11.241 (5 Oct 2001 20:33:45 GMT)
NNTP-Posting-Date: 5 Oct 2001 20:33:45 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.19 i586)
X-Accept-Language: de,fr
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hello.

ywshei wrote:
> I am compiled the Libnet source code(coming from
> http://www.packetfactory.net/libnet/
> ) in DJGPP.
> There are some error messages appeared about the socket driver as the
> following
> 
> In file included from drivers/wsockdos.c:27:
> include/wsockdos.h:157: warning: `IPPROTO_GGP' redefined
> d:/djgpp/include/netinet/in.h:59: warning: this is the location of the
> previous
> definition
[snip]
> make.exe[1]: *** [drivers/wsockdos.o] Error 1
> make.exe[1]: Leaving directory `d:/libnet/lib'
> make.exe: *** [lib] Error 2.

These are warnings, not errors. It looks like libnet is being compiled
with the -Werror flag, which causes the warnings to be treated as errors.

> I have been updated the packages, djgpp2.03, gcc2.953, wattcp32,
> libsocket080 and allegro 3.9.36.
> What version is needed when I compile the Libnet?

OK, there's the problem. DJGPP comes with include/netinet/in.h, but this
only defines a few constants. libsocket updates include/netinet/in.h.
Unfortunately it looks like libnet comes with an include file that defines
the same constants as libsocket's include/netinet/in.h.

You have two options:

1. Uninstall libsocket and reinstall include/netinet/in.h from
djdev203.zip.

2. Fix libnet's include/wsockdos.h include file. You may want to add a
line like:

#undef IPPROTO_GGP

before each defintion:

#define IPPROTO_GGP <whatever it is>

To really fix it, you should check that libsocket and libnet use the same
definitions for everything. This is likely for IPPROTO_* macros, but there
may be some differences in other macros.

Hope that helps, bye,

-- 
Richard Dawe
http://www.phekda.freeserve.co.uk/richdawe/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019