From bd5329c8dcb1a272dbee541efd8094911a7e727e Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 21 Sep 2026 19:16:46 +0100 Subject: [PATCH 1/2] utils: Fix the build with debugging disabled When debug-level log messages weren't enabled at compile-time, we can't look at `bwrap_is_debugging`, because it doesn't exist. Fixes: fd73997 "Add a mechanism to enable debug() at compile-time" Signed-off-by: Simon McVittie --- utils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils.c b/utils.c index ac5c446d..5865cdb5 100644 --- a/utils.c +++ b/utils.c @@ -52,8 +52,10 @@ bwrap_logv (int severity, va_list args, const char *detail) { +#ifdef BWRAP_DEBUG if (severity == LOG_DEBUG && !bwrap_is_debugging) return; +#endif if (bwrap_level_prefix) fprintf (stderr, "<%d>", severity); From 05a5fa2acf875251030fea7a73c200e3b61d68e2 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 21 Sep 2026 19:15:40 +0100 Subject: [PATCH 2/2] build: Fix enablement of debug logging Instead of the intended `debug_logging` option (which is about debug-level log messages), the build-system switch was using Meson's built-in `debug` option (which is about emitting debug symbols for gdb). Fixes: fd73997 "Add a mechanism to enable debug() at compile-time" Signed-off-by: Simon McVittie --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 6c51c145..b2528325 100644 --- a/meson.build +++ b/meson.build @@ -87,7 +87,7 @@ if selinux_dep.found() endif endif -if get_option('debug') +if get_option('debug_logging') cdata.set('BWRAP_DEBUG', 1) endif