Ethereal-dev: Re: [ethereal-dev] compilation-error with ethereal 0.8.2

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

From: Gilbert Ramirez <gram@xxxxxxxxxx>
Date: Wed, 26 Jan 2000 07:01:38 -0600
On Wed, Jan 26, 2000 at 09:40:29AM +0100, Jan Windischmann wrote:
> 
> Hi,
> 
> I tried to compile ethereal 0.8.2 and I got the following error:
> 
> gcc -DHAVE_CONFIG_H -I. -I. -I.   -I. -I./wiretap -I/usr/local/include
> -I/usr/X11R6/include  -Wall -g -O2 -I. -I./wiretap
> -I/usr/local/include -I/usr/X11R6/include -I/usr/lib/glib/include
> -I/usr/X11R6/include -c capture.c
> capture.c: In function `capture_pcap_cb':
> capture.c:856: incompatible types in assignment

Can you show us the pcap_pkthdr in your pcap.h (/usr/include/pcap.h ???)

Mine is:

struct pcap_pkthdr {
        struct timeval ts;      /* time stamp */
        bpf_u_int32 caplen;     /* length of portion present */
        bpf_u_int32 len;        /* length this packet (off wire) */
};

The wtap_pkthdr struct (in our wiretap library) is:

struct wtap_pkthdr {
        struct timeval ts;
        guint32 caplen;
        guint32 len;
        int pkt_encap;
        union pseudo_header pseudo_header;
};

Line 856 in capture.c, BTW, is:

     whdr.ts = phdr->ts;

Where,
	const struct pcap_pkthdr *phdr;
	struct wtap_pkthdr whdr;

--gilbert