summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 080df02)
raw | patch | inline | side by side (parent: 080df02)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sat, 10 Feb 2007 09:40:30 +0000 (10:40 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sat, 10 Feb 2007 09:40:30 +0000 (10:40 +0100) |
src/Makefile.am | patch | blob | history | |
src/dns.c | patch | blob | history | |
src/utils_dns.c | patch | blob | history |
diff --git a/src/Makefile.am b/src/Makefile.am
index d9b3b9cabc9a35783188f104fe1868d2c8421582..58cc0fe2a6ed845c9c19f7df10a50f0d4c5189b9 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
if BUILD_MODULE_DNS
pkglib_LTLIBRARIES += dns.la
-dns_la_SOURCES = dns.c utils_dns.c utils_dns.h
+dns_la_SOURCES = dns.c
+if BUILD_WITH_LIBPCAP
+if BUILD_WITH_LIBPTHREAD
+dns_la_SOURCES += utils_dns.c utils_dns.h
+endif
+endif
dns_la_LDFLAGS = -module -avoid-version
if BUILD_WITH_LIBPCAP
dns_la_LDFLAGS += -lpcap
diff --git a/src/dns.c b/src/dns.c
index cd068fb363744b05c06f637a53ec248bd4d48ea5..cd73a7e0c7b227d0c5cfcd61d4e92bbe593be3ac 100644 (file)
--- a/src/dns.c
+++ b/src/dns.c
#include "plugin.h"
#include "configfile.h"
#include "utils_debug.h"
-#include "utils_dns.h"
#define MODULE_NAME "dns"
#if HAVE_LIBPCAP && HAVE_LIBPTHREAD
+# include "utils_dns.h"
# include <pthread.h>
# include <pcap.h>
# include <sys/poll.h>
diff --git a/src/utils_dns.c b/src/utils_dns.c
index a6643bbf2774e72041b9ba7a891bc84571a65713..6541b897ffdd68da466472269998b3d4b893d549 100644 (file)
--- a/src/utils_dns.c
+++ b/src/utils_dns.c
#include "collectd.h"
+#if HAVE_NETINET_IN_SYSTM_H
+# include <netinet/in_systm.h>
+#endif
#if HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
# include <netdb.h>
#endif
-#if HAVE_NETINET_IN_SYSTM_H
-# include <netinet/in_systm.h>
-#endif
-#if HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
#if HAVE_NETINET_IP_H
# include <netinet/ip.h>
#endif