From 541367b2720648919d318c6ac8694a291eaa2b27 Mon Sep 17 00:00:00 2001 From: Andreas Aardal Hanssen Date: Tue, 10 Nov 2009 10:48:11 +0100 Subject: Avoid XSync-related runtime crashes on HP-UX due to C++ mangling. HP-UX is missing the extern "C" wrapper for its XSync function declarations. This caused applications to _build_ but not _run_ (i.e., all GUI apps crashed). Adding the wrapper should be harmless on all X11 platforms. Task-number: QTBUG-5524 Reviewed-by: Thiago (cherry picked from commit d845505fd57ad4b06499b5b125703e80bbae692a) --- config.tests/x11/xsync/xsync.cpp | 2 ++ src/gui/kernel/qt_x11_p.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/config.tests/x11/xsync/xsync.cpp b/config.tests/x11/xsync/xsync.cpp index ed3ecf5..8eea850 100644 --- a/config.tests/x11/xsync/xsync.cpp +++ b/config.tests/x11/xsync/xsync.cpp @@ -41,7 +41,9 @@ #include #include +extern "C" { #include +} int main(int, char **) { diff --git a/src/gui/kernel/qt_x11_p.h b/src/gui/kernel/qt_x11_p.h index 9f08dc6..9e4cf60 100644 --- a/src/gui/kernel/qt_x11_p.h +++ b/src/gui/kernel/qt_x11_p.h @@ -163,7 +163,9 @@ extern "C" { #endif // QT_NO_XRENDER #ifndef QT_NO_XSYNC +extern "C" { # include "X11/extensions/sync.h" +} #endif // #define QT_NO_XKB -- cgit v0.12