dns plugin: Disable the plugin if <pcap-bpf.h> is not available.
authorFlorian Forster <octo@huhu.verplant.org>
Fri, 7 Jan 2011 07:12:54 +0000 (08:12 +0100)
committerFlorian Forster <octo@huhu.verplant.org>
Fri, 7 Jan 2011 07:12:54 +0000 (08:12 +0100)
Apparently the AIX version of PCAP doesn't have this header file and is
thus missing a required struct definition.

configure.in
src/dns.c

index f6bb58b..20a1640 100644 (file)
@@ -2765,7 +2765,8 @@ then
 fi
 if test "x$with_libpcap" = "xyes"
 then
-       AC_CHECK_HEADERS(pcap-bpf.h)
+       AC_CHECK_HEADERS(pcap-bpf.h,,
+                        [with_libpcap="no (pcap-bpf.h not found)"])
 fi
 AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes")
 # }}}
index 09082fc..95797f5 100644 (file)
--- a/src/dns.c
+++ b/src/dns.c
@@ -33,9 +33,7 @@
 #include <poll.h>
 
 #include <pcap.h>
-#if HAVE_PCAP_BPF_H
-# include <pcap-bpf.h>
-#endif
+#include <pcap-bpf.h>
 
 /*
  * Private data types