[dsc] gcc problem?
Florian Weimer
fw at deneb.enyo.de
Wed Dec 12 21:19:00 UTC 2007
* Duane Wessels:
> On Wed, 12 Dec 2007, Dikshie wrote:
>
>> Hi,
>> i use old gcc:
>> --------
>> Using builtin specs
>> gcc version 2.95.4 20020320 [FreeBSD]
>> -------
>>
>> i got hit by in collector by:
>>
>> cc -g -Wall -DUSE_IPV6=1 -I ../TmgBase/Hapy/src/include -c pcap.c
>> pcap.c:152: field `buf' has incomplete type
>> pcap.c:160: filed `buf' has incomplete type
>>
>> is that gcc issue/problem?
>
> I'm guessing that it is these lines?:
>
> u_char buf[]; /* reassembled message (C99 flexible array member) */
> ....
> u_char buf[]; /* segment payload (C99 flexible array member) */
>
> My guess is that older gcc is not familiar with this syntax. If you can't
> upgrade your gcc, then you could try changing those lines to say:
>
> u_char *buf;
Actually, that should be:
u_char buf[0];
Using a pointer instead will lead to crashes.
More information about the dsc
mailing list