From cc6e4cfecf42d862d76a8b5de8da5e2cd1339b4d Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Sun, 11 Dec 2016 18:09:19 +0100 Subject: [PATCH] Fix detection of libyajl and fix compilation if it's missing. D'oh! :-/ --- configure.ac | 2 +- src/tools/sysdb/json.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index c671004..521f0ac 100644 --- a/configure.ac +++ b/configure.ac @@ -480,7 +480,7 @@ AC_ARG_WITH([libyajl], if test "x$with_libyajl" = "xyes" || test "x$with_libyajl" = "xauto"; then PKG_CHECK_MODULES([YAJL], [yajl], [have_libyajl="yes"], [have_libyajl="no"]) fi -if test "x$with_libyajl" = "xyes"; then +if test "x$have_libyajl" = "xyes"; then AC_DEFINE([HAVE_LIBYAJL], 1, [Define to 1 if you have the 'yajl' library.]) fi diff --git a/src/tools/sysdb/json.c b/src/tools/sysdb/json.c index fdd4194..4f36179 100644 --- a/src/tools/sysdb/json.c +++ b/src/tools/sysdb/json.c @@ -158,6 +158,7 @@ sdb_json_print(sdb_input_t *input, sdb_strbuf_t *buf) yajl_free(h); return ret; #else /* HAVE_LIBYAJL */ + (void)input; printf("%s\n", sdb_strbuf_string(buf)); return 0; #endif /* HAVE_LIBYAJL */ -- 2.30.2