From c05cbad5604feb3a44fee636433332b0df2173f3 Mon Sep 17 00:00:00 2001 From: Christop Kraemer Date: Thu, 9 Feb 2023 12:05:42 +0100 Subject: [PATCH] Fix: define LOG_REFERENCES_AVAILABLE in header Must be defined in the header to apply to applications using this library, when build in release mode. --- base/logging.c | 8 +------- base/logging.h | 6 ++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/base/logging.c b/base/logging.c index b352fa22..13de65a3 100644 --- a/base/logging.c +++ b/base/logging.c @@ -48,12 +48,6 @@ */ #define G_LOG_DOMAIN "libgvm base" -/** - * @brief for backward compatibility - * - */ -#define LOG_REFERENCES_AVAILABLE - /** * @struct gvm_logging_t * @brief Logging stores the parameters loaded from a log configuration @@ -581,7 +575,7 @@ gvm_log_func (const char *log_domain, GLogLevelFlags log_level, /* If the current char is a % and the next one is a p, get the pid. */ if ((*tmp == '%') && (*(tmp + 1) == 'p')) { - if (reference != NULL) + if (reference) { prepend_tmp = g_strdup_printf ("%s%d%s%s", prepend_buf, (int) getpid (), diff --git a/base/logging.h b/base/logging.h index 0aab6d03..7ba9ad8e 100644 --- a/base/logging.h +++ b/base/logging.h @@ -27,6 +27,12 @@ #include /* for GSList, gchar, GLogLevelFlags, gpointer */ +/** + * @brief for backward compatibility + * + */ +#define LOG_REFERENCES_AVAILABLE + GSList * load_log_configuration (gchar *);