summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4bc72cf)
raw | patch | inline | side by side (parent: 4bc72cf)
author | Florian Forster <octo@huhu.verplant.org> | |
Tue, 4 Jan 2011 11:39:22 +0000 (12:39 +0100) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Tue, 4 Jan 2011 11:41:35 +0000 (12:41 +0100) |
configure.in | patch | blob | history | |
src/dns.c | patch | blob | history |
diff --git a/configure.in b/configure.in
index b8c067381b988f7be4c7d2e74d167e733fd046b7..ad7017ee8cc090ac43dfb34f59a02a24e8c78fec 100644 (file)
--- a/configure.in
+++ b/configure.in
fi
if test "x$with_libpcap" = "xyes"
then
- AC_CHECK_HEADERS(pcap.h,
- [
- AC_DEFINE(HAVE_PCAP_H, 1, [Define to 1 if you have the <pcap.h> header file.])
- ], [with_libpcap="no (pcap.h not found)"])
+ AC_CHECK_HEADERS(pcap.h,,
+ [with_libpcap="no (pcap.h not found)"])
fi
if test "x$with_libpcap" = "xyes"
then
- collect_libpcap=1
-else
- collect_libpcap=0
+ AC_CHECK_HEADERS(pcap-bpf.h)
fi
-AC_DEFINE_UNQUOTED(COLLECT_LIBPCAP, [$collect_libpcap],
- [Wether or not to use the pcap library])
AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes")
# }}}
diff --git a/src/dns.c b/src/dns.c
index f3280c0bed9f65ef37d3e8e554be640ca36ab83d..364b9587e19c5c49ac6010049c2befa8f503ea35 100644 (file)
--- a/src/dns.c
+++ b/src/dns.c
/**
* collectd - src/dns.c
- * Copyright (C) 2006,2007 Florian octo Forster
+ * Copyright (C) 2006-2011 Florian octo Forster
* Copyright (C) 2009 Mirko Buffoni
*
* This program is free software; you can redistribute it and/or modify it
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* Authors:
- * Florian octo Forster <octo at verplant.org>
+ * Florian octo Forster <octo at collectd.org>
* Mirko Buffoni <briareos at eswat.org>
**/
#include "utils_dns.h"
#include <pthread.h>
-#include <pcap.h>
#include <poll.h>
+#include <pcap.h>
+#if HAVE_PCAP_BPF_H
+# include <pcap-bpf.h>
+#endif
+
/*
* Private data types
*/
pthread_mutex_unlock (&opcode_mutex);
}
-static void *dns_child_loop (void __attribute__((unused)) *dummy)
+static void *dns_child_loop (__attribute__((unused)) void *dummy)
{
pcap_t *pcap_obj;
char pcap_error[PCAP_ERRBUF_SIZE];