Ethereal-dev: [Ethereal-dev] Problems with defining inline, when winpcap3.0 combined with glib

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

From: Ulf Lamping <ulf.lamping@xxxxxx>
Date: Sun, 21 Dec 2003 23:36:44 +0100
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?

Regards, ULFL