tag 438808 patch thanks The attached patch fixes the build of 4g8 using libpcap0.8-dev by guarding the includes of net/bpf.h with a check of HAVE_NET_BPF_H, which is already defined (or not) by configure.
I verified that it allowed 4g8 to build using both libpcap0.7-dev and libpcap0.8-dev (although removing the includes altogether also worked with both packages). -- Matt
diff -ru 4g8-1.0~/src/globals.h 4g8-1.0/src/globals.h --- 4g8-1.0~/src/globals.h 2007-08-19 15:58:30.000000000 -0700 +++ 4g8-1.0/src/globals.h 2007-08-19 15:59:10.000000000 -0700 @@ -31,7 +31,9 @@ #include <libnet.h> #include <pcap.h> #include <sys/types.h> +#ifdef HAVE_NET_BPF_H #include <net/bpf.h> +#endif #include <signal.h> #include <time.h> #include <stdio.h> diff -ru 4g8-1.0~/src/main.h 4g8-1.0/src/main.h --- 4g8-1.0~/src/main.h 2007-08-19 15:58:30.000000000 -0700 +++ 4g8-1.0/src/main.h 2007-08-19 15:59:46.000000000 -0700 @@ -23,10 +23,17 @@ #ifndef __MAIN_H #define __MAIN_H +#ifndef __HAVE_CONFIG_H +#define __HAVE_CONFIG_H +#include "../config.h" +#endif + #include <libnet.h> #include <pcap.h> #include <sys/types.h> +#ifdef HAVE_NET_BPF_H #include <net/bpf.h> +#endif #include <signal.h> #include <time.h> #include <stdio.h>