From c69f537cef6f26b2bc0876508212781f6bb53fe7 Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Fri, 2 Nov 2012 18:46:22 +0100 Subject: configure: add flag to disable NFACCT build It is now possible to pass the --disable-nfacct flag to disable compilation of NFACCT input plugin. Doing this the build of ulogd is possible on system where nfacct is not available. --- output/ulogd_output_XML.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'output/ulogd_output_XML.c') diff --git a/output/ulogd_output_XML.c b/output/ulogd_output_XML.c index e9c3974..5892a5d 100644 --- a/output/ulogd_output_XML.c +++ b/output/ulogd_output_XML.c @@ -20,7 +20,10 @@ #include #include +#include "../config.h" +#ifdef BUILD_NFACCT #include +#endif #include #include #include @@ -118,6 +121,7 @@ xml_output_packet(struct ulogd_key *inp, char *buf, ssize_t size) static int xml_output_sum(struct ulogd_key *inp, char *buf, ssize_t size) { +#ifdef BUILD_NFACCT struct nfacct *nfacct = ikey_get_ptr(&inp[KEY_SUM]); int tmp; @@ -125,10 +129,13 @@ xml_output_sum(struct ulogd_key *inp, char *buf, ssize_t size) NFACCT_SNPRINTF_F_TIME); if (tmp < 0 || tmp >= size) return -1; - return 0; +#else + return -1; +#endif } + static int xml_output(struct ulogd_pluginstance *upi) { struct ulogd_key *inp = upi->input.keys; -- cgit v1.2.3