Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 29176: /trunk/epan/ /trunk/epan/dfil

From: Kovarththanan Rajaratnam <kovarththanan.rajaratnam@xxxxxxxxx>
Date: Thu, 23 Jul 2009 12:17:54 +0200
Hey,

Martin Mathieson wrote:
Hi, I'm getting this:

gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I./../.. -I./.. -I/usr/local/include -DPLUGIN_DIR=\"/usr/local/lib/wireshark/plugins/1.3.0\" -Werror -DINET6 "-D_U_=__attribute__((unused))" -g -O2 -Wall -W -Wextra -Wdeclaration-after-statement -Wendif-labels -Wpointer-arith -Wcast-align -Wformat-security -I/usr/local/include -pthread -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/include/libpng12 -I/opt/gnome/include/gtk-2.0 -I/opt/gnome/lib/gtk-2.0/include -I/opt/gnome/include/atk-1.0 -I/opt/gnome/include/pango-1.0 -I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib/glib-2.0/include -MT ftypes.lo -MD -MP -MF .deps/ftypes.Tpo -c ftypes.c -fPIC -DPIC -o .libs/ftypes.o
In file included from ../../epan/epan.h:34,
                 from ../../epan/proto.h:1537,
                 from ../../epan/packet.h:29,
                 from ./ftypes-int.h:26,
                 from ftypes.c:27:
.../../epan/dfilter/dfilter.h:30: error: redefinition of typedef 'dfilter_t'
../../epan/column_info.h:31: error: previous declaration of 'dfilter_t' was here
make[3]: *** [ftypes.lo] Error 1
make[3]: Leaving directory `/users/martinm/wireshark/epan/ftypes'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/users/martinm/wireshark/epan'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/users/martinm/wireshark'
make: *** [all] Error 2

It seems that there are some circular dependencies in the header files. Could you try this patch? It moves the dfilter forward declaration to a new file, dfilter-fwd.h

https://bugs.wireshark.org/bugzilla/attachment.cgi?id=3387

Note: I've only tested this on MSVC.

--
Best regards,
Kovarththanan Rajaratnam