From 8db7bad6e1901718f5ababc7849a8fb6c4415370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Martins?= Date: Fri, 26 Jun 2015 10:57:02 +0100 Subject: [PATCH] QNX: Fix namespace Qt build Declare __progname outside the namespace Task-number: QTBUG-43569 Change-Id: I000c6fea2e24d9b1a3514ec5de93649baa3e33a8 Reviewed-by: Rafael Roquetto --- src/corelib/global/qlogging.cpp | 6 ++++-- 1 file 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()) # include 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) {