From: Florian Forster Date: Tue, 4 Jan 2011 11:41:51 +0000 (+0100) Subject: Merge branch 'collectd-4.9' into collectd-4.10 X-Git-Tag: collectd-4.10.3~4 X-Git-Url: https://git.octo.it/?p=collectd.git;a=commitdiff_plain;h=a24baf2ad70837ea46cacbfee6e03537cf284ad5;hp=86d38d88547bd38bcb0e5a450508f1bcfc14c810 Merge branch 'collectd-4.9' into collectd-4.10 --- diff --git a/configure.in b/configure.in index 89c870b4..5c3564c4 100644 --- a/configure.in +++ b/configure.in @@ -2556,19 +2556,13 @@ then 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 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 f3280c0b..364b9587 100644 --- a/src/dns.c +++ b/src/dns.c @@ -1,6 +1,6 @@ /** * 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 @@ -17,7 +17,7 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * Authors: - * Florian octo Forster + * Florian octo Forster * Mirko Buffoni **/ @@ -30,9 +30,13 @@ #include "utils_dns.h" #include -#include #include +#include +#if HAVE_PCAP_BPF_H +# include +#endif + /* * Private data types */ @@ -218,7 +222,7 @@ static void dns_child_callback (const rfc1035_header_t *dns) 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]; diff --git a/src/java.c b/src/java.c index 528ec9c4..b2ff4981 100644 --- a/src/java.c +++ b/src/java.c @@ -1931,7 +1931,9 @@ static int cjni_init_native (JNIEnv *jvm_env) /* {{{ */ api_class_ptr = (*jvm_env)->FindClass (jvm_env, "org/collectd/api/Collectd"); if (api_class_ptr == NULL) { - ERROR ("cjni_init_native: Cannot find API class `org/collectd/api/Collectd'."); + ERROR ("cjni_init_native: Cannot find the API class \"org.collectd.api" + ".Collectd\". Please set the correct class path " + "using 'JVMArg \"-Djava.class.path=...\"'."); return (-1); }