diff options
author | Eric Leblond <eric@regit.org> | 2012-11-02 18:46:22 +0100 |
---|---|---|
committer | Eric Leblond <eric@regit.org> | 2012-11-04 08:56:55 +0100 |
commit | c69f537cef6f26b2bc0876508212781f6bb53fe7 (patch) | |
tree | efc9ba9e08f5a853dbafd6b99396aef071ecd401 /output | |
parent | 19b2d83ff631aaca3fe5e2be895cc7256f209a0b (diff) |
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.
Diffstat (limited to 'output')
-rw-r--r-- | output/ulogd_output_XML.c | 9 |
1 files changed, 8 insertions, 1 deletions
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 <libnetfilter_conntrack/libnetfilter_conntrack.h> #include <libnetfilter_log/libnetfilter_log.h> +#include "../config.h" +#ifdef BUILD_NFACCT #include <libnetfilter_acct/libnetfilter_acct.h> +#endif #include <ulogd/ulogd.h> #include <sys/param.h> #include <time.h> @@ -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; |