On Thu, Jul 23, 2009 at 12:17:54PM +0200, Kovarththanan Rajaratnam wrote:
> 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.
You can't typedef again, even if you use it without includes, in single file like:
typedef struct fook fook_t;
typedef struct fook {
int a;
} fook_t;
it will generates error:
foo.c:7: error: redefinition of typedef 'bar_t'
foo.c:1: error: previous declaration of 'bar_t' was here
but you can do:
struct bar; /* forward, just in case? */
struct foo {
struct bar *baz;
};
typedef struct bar {
int field1;
} baz_t;