summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/global/qlogging.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index 88882bbe8f..0846d2a6db 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -87,6 +87,10 @@
# endif
#endif
+#if defined(QT_USE_SLOG2)
+extern char *__progname;
+#endif
+
#if defined(Q_OS_LINUX) && (defined(__GLIBC__) || __has_include(<sys/syscall.h>))
# include <sys/syscall.h>
static long qt_gettid()
@@ -1173,8 +1177,6 @@ void QMessagePattern::setPattern(const QString &pattern)
#define QT_LOG_CODE 9000
#endif
-extern char *__progname;
-
static void slog2_default_handler(QtMsgType msgType, const char *message)
{
if (slog2_set_default_buffer((slog2_buffer_t)-1) == 0) {