X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdns.c;h=8339377b2dbb82babf8773e6d00a1c2c0513cce1;hb=139dd00301131050db32bf0cb08333aa7440c817;hp=d82cbd86cc19809f7ff4180868534911a9049dc7;hpb=bc7992ed0693313a2b1fe282a5bf23f1cc9f8e42;p=collectd.git diff --git a/src/dns.c b/src/dns.c index d82cbd86..8339377b 100644 --- a/src/dns.c +++ b/src/dns.c @@ -19,6 +19,8 @@ * Florian octo Forster **/ +#define _BSD_SOURCE + #include "collectd.h" #include "common.h" #include "plugin.h" @@ -195,7 +197,7 @@ static void dns_child_callback (const rfc1035_header_t *dns) pthread_mutex_unlock (&opcode_mutex); } -static void *dns_child_loop (void *dummy) +static void *dns_child_loop (void __attribute__((unused)) *dummy) { pcap_t *pcap_obj; char pcap_error[PCAP_ERRBUF_SIZE]; @@ -212,7 +214,7 @@ static void *dns_child_loop (void *dummy) /* Passing `pcap_device == NULL' is okay and the same as passign "any" */ DEBUG ("Creating PCAP object.."); - pcap_obj = pcap_open_live (pcap_device, + pcap_obj = pcap_open_live ((pcap_device != NULL) ? pcap_device : "any", PCAP_SNAPLEN, 0 /* Not promiscuous */, interval_g,