summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a56d4f1)
raw | patch | inline | side by side (parent: a56d4f1)
author | Sebastian Harl <sh@tokkee.org> | |
Mon, 4 Dec 2006 10:04:17 +0000 (11:04 +0100) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Mon, 4 Dec 2006 10:11:34 +0000 (11:11 +0100) |
If pcap.h is not found, the compiler complains about some "defined but not
used" warnings. As we're using -Werror this causes the build to abort.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
used" warnings. As we're using -Werror this causes the build to abort.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
src/utils_dns.c | patch | blob | history |
diff --git a/src/utils_dns.c b/src/utils_dns.c
index 2f6c191245d9fe5a7d2a6995b3773159313a9feb..2c710093cf7329e4c4c86a7b0497de4102531f34 100644 (file)
--- a/src/utils_dns.c
+++ b/src/utils_dns.c
static ip_list_t *IgnoreList = NULL;
+#if HAVE_PCAP_H
static void (*Callback) (const rfc1035_header_t *) = NULL;
static int query_count_intvl = 0;
static int query_count_total = 0;
-#ifdef __OpenBSD__
+# ifdef __OpenBSD__
static struct bpf_timeval last_ts;
-#else
+# else
static struct timeval last_ts;
-#endif
+# endif /* __OpenBSD__ */
+#endif /* HAVE_PCAP_H */
static int cmp_in6_addr (const struct in6_addr *a,
const struct in6_addr *b)
freeaddrinfo (ai_list);
}
+#if HAVE_PCAP_H
static void in6_addr_from_buffer (struct in6_addr *ia,
const void *buf, size_t buf_len,
int family)
}
} /* void in6_addr_from_buffer */
-#if HAVE_PCAP_H
void dnstop_set_pcap_obj (pcap_t *po)
{
pcap_obj = po;
}
-#endif
void dnstop_set_callback (void (*cb) (const rfc1035_header_t *))
{
}
/* public function */
-#if HAVE_PCAP_H
void handle_pcap(u_char *udata, const struct pcap_pkthdr *hdr, const u_char *pkt)
{
int status;
@@ -642,7 +642,7 @@ void handle_pcap(u_char *udata, const struct pcap_pkthdr *hdr, const u_char *pkt
query_count_total++;
last_ts = hdr->ts;
}
-#endif
+#endif /* HAVE_PCAP_H */
const char *qtype_str(int t)
{