On (19/02/14 12:52), Jakub Hrozek wrote:
When testing other patches on review, I realized that building sssd
fails when journald is disabled. The attached patch fixes the build.
From 817917ff18291fa3aa5ab23ea15e58a482354c89 Mon Sep 17 00:00:00
2001
From: Jakub Hrozek <jhrozek(a)redhat.com>
Date: Wed, 19 Feb 2014 12:51:14 +0100
Subject: [PATCH] DEBUG: Fix build without journald
---
src/util/debug.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/util/debug.c b/src/util/debug.c
index 908fca440f1efe0add5ffa540932a9c79397b52b..9cd0f41fffcda50bec52147b4bc9afe836392a17
100644
--- a/src/util/debug.c
+++ b/src/util/debug.c
@@ -203,14 +203,14 @@ void debug_fn(const char *file,
const char *format, ...)
{
va_list ap;
-
-#ifdef WITH_JOURNALD
- errno_t ret;
struct timeval tv;
struct tm *tm;
char datetime[20];
int year;
+#ifdef WITH_JOURNALD
+ errno_t ret;
+
if (!debug_file) {
/* If we are not outputting logs to files, we should be sending them
* to journald.
This problem was introduced in the recent patch and cause 9 errors in my case.
commit 60df591b865831a71e93eb57f4c353c4555b66cf
Author: Stephen Gallagher <sgallagh(a)redhat.com>
Date: Fri Dec 20 16:14:25 2013 -0500
DEBUG: Enable sending structured debug logs to journald
Next time, try to review patches more carefully (if patches contain conditional
build)
ACK
LS