Ethereal-dev: [Ethereal-dev] Re: [WinPcap-bugs] Problems with defining inline, when winpcap3.0

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Loris Degioanni" <loris@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 22 Dec 2003 17:14:20 +0100
Hi,


> Hi List!
>
> When compiling Ethereal (a network protocol analyzer) using MSVC, I (and
> a lot others) are getting the following warning:
>
> D:\ulfl\proj\Ethereal\libs\WPdpack\include\gnuc.h(18) : warning C4005:
> 'inline' : Makro-Neudefinition
>
> D:\ulfl\proj\Ethereal\libs\ethereal.com\include\glib-2.0\glib/gutils.h(95)
> : Siehe vorherige Definition von 'inline'
>
> The source sequence producing this warning looks like this:
>
> #include <gtk/gtk.h>
>
> #ifdef HAVE_LIBPCAP
> #include <pcap.h>
> #endif
>
> As the glib/gtk already defines 'inline', pcap.h has some problems with
it.
>
> When switching the sequence (including pcap.h before gtk.h), the warning
> does not appear.
>
> I'm using winpcap version 3.0.
>
> Is it possible, to define 'inline' only, if it's not already defined?

No problems, but are you sure you are using version 3.0 of the WinPcap
develper's pack? In this version, gnuc.h is no more included by bpf.h, and
therefore by pcap.h. As a consequence, WinPcap and the developer's pack
tools don't use gnuc.h at all. Unless Ethereal explicitly includes gnuc.h,
and unless I'm missing something, you should have no problems with it.

Loris