[pulseaudio-discuss] [PATCH] log: Fix compilation error on non-systemd systems
Ahmed S. Darwish
darwish.07 at gmail.com
Wed Sep 16 12:14:20 PDT 2015
Commit 262bdae0330e used symbols which are only available if systemd
support was compiled in. Fix by using the appropriate #ifdef guards.
Reported-by: David Henningsson <david.henningsson at canonical.com>
Signed-off-by: Ahmed S. Darwish <darwish.07 at gmail.com>
---
src/pulsecore/log.c | 2 ++
1 file changed, 2 insertions(+)
Dave, I found that #ifdef HAVE_SYSTEMD_JOURNAL guards are already
used in a different number of places. So if they're to be removed,
let's do so in a different isolated commit.
Tanu, I couldn't add a warning message to the user: pa_log_warn()
calls pa_log_level_meta calls pa_log_level_v_meta() which calls
back init_defaults() .. infinite recursion ;-)
diff --git a/src/pulsecore/log.c b/src/pulsecore/log.c
index 34ed041..3c876f6 100644
--- a/src/pulsecore/log.c
+++ b/src/pulsecore/log.c
@@ -294,10 +294,12 @@ static void init_defaults(void) {
target_override_set = true;
}
+#ifdef HAVE_SYSTEMD_JOURNAL
if (getenv(ENV_LOG_JOURNAL)) {
target_override = PA_LOG_JOURNAL;
target_override_set = true;
}
+#endif
if ((e = getenv(ENV_LOG_LEVEL))) {
maximum_level_override = (pa_log_level_t) atoi(e);
Regards,
--
Darwish
http://darwish.chasingpointers.com
More information about the pulseaudio-discuss
mailing list