summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-11-10 09:48:11 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2009-11-13 12:38:53 (GMT)
commit541367b2720648919d318c6ac8694a291eaa2b27 (patch)
tree88d690aaa84ea8b72cb014dbc8ad9aae61d203b7
parent3559915bb57215670413470eb7f66324547b9c7d (diff)
downloadQt-541367b2720648919d318c6ac8694a291eaa2b27.zip
Qt-541367b2720648919d318c6ac8694a291eaa2b27.tar.gz
Qt-541367b2720648919d318c6ac8694a291eaa2b27.tar.bz2
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)
-rw-r--r--config.tests/x11/xsync/xsync.cpp2
-rw-r--r--src/gui/kernel/qt_x11_p.h2
2 files changed, 4 insertions, 0 deletions
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 <X11/Xlib.h>
#include <X11/Xutil.h>
+extern "C" {
#include <X11/extensions/sync.h>
+}
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