This file fails to compile with the latest libpcap since
pcap_compile() now takes a 'const char *' as the filter-string.
AFAICS an easy fix is to use WPCAP_CONSTIFIED. Patch attached.
--gv
--- SVN-Latest/capture-wpcap.c Mon Jan 22 23:20:35 2007
+++ capture-wpcap.c Sat Jul 28 16:34:35 2007
@@ -62,7 +62,7 @@
static int (*p_pcap_datalink) (pcap_t *);
static int (*p_pcap_setfilter) (pcap_t *, struct bpf_program *);
static char* (*p_pcap_geterr) (pcap_t *);
-static int (*p_pcap_compile) (pcap_t *, struct bpf_program *, char *, int,
+static int (*p_pcap_compile) (pcap_t *, struct bpf_program *, const char *, int,
bpf_u_int32);
#ifdef WPCAP_CONSTIFIED
static int (*p_pcap_lookupnet) (const char *, bpf_u_int32 *, bpf_u_int32 *,
@@ -232,7 +232,11 @@
}
int
+#ifdef WPCAP_CONSTIFIED
+pcap_compile(pcap_t *a, struct bpf_program *b, const char *c, int d,
+#else
pcap_compile(pcap_t *a, struct bpf_program *b, char *c, int d,
+#endif
bpf_u_int32 e)
{
g_assert(has_wpcap);