[dsc] pcap.c, const struct udphdr on Debian/kFreeBSD
Duane Wessels
wessels at measurement-factory.com
Mon Apr 11 16:34:46 UTC 2011
On Mon, 11 Apr 2011, Marc Haber wrote:
> Hi,
>
> dsc seems to fail to build on Debian/kFreeBSD. It complains about
> const struct udphdr missing some members:
>
>> pcap.c: In function 'handle_udp':
>> pcap.c:139:20: error: 'const struct udphdr' has no member named 'uh_sport'
>> pcap.c:139:20: error: 'const struct udphdr' has no member named 'uh_sport'
Near the top of pcap.c you'll find this:
#ifdef __linux__
#define uh_dport dest
#define uh_sport source
My guess is that "__linux__" is not defined for this compile
environment.
I'm not saying it should be. I don't know the ways of Debian/kFreeBSD.
If there is another symbol that can be checked, we should include it
in the if statement.
DW
More information about the dsc
mailing list